44 #ifndef CCXX_PROCESS_H_
45 #define CCXX_PROCESS_H_
47 #ifndef CCXX_CONFIG_H_
48 #include <cc++/config.h>
51 #ifndef CCXX_THREAD_H_
55 #ifdef CCXX_NAMESPACES
76 typedef RETSIGTYPE (*Trap)(int);
83 static void detach(
void);
92 static void attach(
const char *devname);
101 static Trap setPosixSignal(
int signo, Trap handler);
110 static Trap setInterruptSignal(
int signo, Trap handler);
120 bool lock(
bool future =
true);
144 static int spawn(
const char *exec,
const char **argv,
bool wait =
true);
153 static int join(
int pid);
162 static bool cancel(
int pid,
int sig = 0);
170 static const char *getEnv(
const char *name);
179 static void setEnv(
const char *name,
const char *value,
bool overwrite);
186 static const char *getConfigDir(
void);
193 static const char *getHomeDir(
void);
200 static const char *getUser(
void);
207 static bool setUser(
const char *
id,
bool grp =
true);
214 static bool setGroup(
const char *
id);
221 static size_t getPageSize(
void);
226 static void setPriority(
int pri);
231 static void setScheduler(
const char *policy);
236 static void setRealtime(
int pri = 0);
241 static bool isScheduler(
void);
296 bool lock(
const char *name);
311 #ifdef CCXX_NAMESPACES
This class is used to create a "named" lock entity that can be used to control access to a resource b...
Synchronization and threading services.
static bool isRealtime(void)
Return true if realtime scheduling.
~Lockfile()
Destroy the current lock and release it.
A class for containing portable process related functions that help create portable code...