libUTL++
LinuxHostOS.h
1 #pragma once
2 
4 
5 #include <libutl/HostOS.h>
6 
8 
9 UTL_NS_BEGIN;
10 
12 
20 
22 class LinuxHostOS : public HostOS
23 {
26 
27 public:
28  virtual char getPathSeparator() const;
29  virtual void chdir(const Pathname& path);
30  virtual void daemonInit();
31 
37  void setCanonicalTTY(int fd, bool canon);
38 
40 
41  virtual int run(const Pathname& path, const TArray<String>& args);
42 
43  int
44  run(const String& cmd)
45  {
46  return super::run(cmd);
47  }
49 
51 
52  virtual void sleep(uint_t sec) const;
53  virtual void usleep(uint64_t usec) const;
54  virtual void yield() const;
56 
58 
59  virtual String getEnv(const String& envVarName) const;
60  virtual String setEnv(const String& envVarName, const String& envVarVal);
61  virtual String remEnv(const String& envVarName);
63 };
64 
66 
67 UTL_NS_END;
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
Definition: macros.h:532
Filesystem pathname.
Definition: Pathname.h:32
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
Definition: macros.h:688
Character string.
Definition: String.h:31
Template version of Array.
Definition: TArray.h:25
unsigned long uint64_t
Unsigned 64-bit integer.
Definition: types.h:154
Abstraction for common OS functionality.
Definition: HostOS.h:23
unsigned int uint_t
Unsigned integer.
Definition: types.h:59
Encapsulate common UNIX OS functionality.
Definition: LinuxHostOS.h:22