Go to the documentation of this file.
44 #ifndef COMMONCPP_PROCESS_H_
45 #define COMMONCPP_PROCESS_H_
47 #ifndef COMMONCPP_CONFIG_H_
48 #include <commoncpp/config.h>
51 #ifndef COMMONCPP_THREAD_H_
74 typedef void (*Trap)(int);
81 static void detach(
void);
90 static void attach(
const char *devname);
99 static Trap setPosixSignal(
int signo, Trap handler);
108 static Trap setInterruptSignal(
int signo, Trap handler);
118 bool lock(
bool future =
true);
142 static int spawn(
const char *exec,
const char **argv,
bool wait =
true);
151 static int join(
int pid);
160 static bool cancel(
int pid,
int sig = 0);
168 static const char *getEnv(
const char *name);
177 static void setEnv(
const char *name,
const char *value,
bool overwrite);
184 static const char *getConfigDir(
void);
191 static const char *getHomeDir(
void);
198 static const char *getUser(
void);
205 static bool setUser(
const char *
id,
bool grp =
true);
212 static bool setGroup(
const char *
id);
219 static size_t getPageSize(
void);
224 static void setPriority(
int pri);
229 static void setScheduler(
const char *policy);
234 static void setRealtime(
int pri = 0);
239 static bool isScheduler(
void);
244 static inline bool isRealtime(
void)
294 bool lock(
const char *name);