#include <process.h>
Public Types | |
typedef RETSIGTYPE (* | Trap )(int) |
Public Methods | |
bool | lock (bool future=true) |
Lock a process in memory. More... | |
void | unlock (void) |
Unlock process pages. More... | |
Static Public Methods | |
void | detach (void) |
Detach current process into a daemon, posix only. More... | |
void | attach (const char *devname) |
Attach the current process to another device or i/o session. More... | |
Trap | setPosixSignal (int signo, Trap handler) |
Set a posix compliant signal handler. More... | |
Trap | setInterruptSignal (int signo, Trap handler) |
Set system call interuptable signal handler. More... | |
int | spawn (const char *exec, const char **argv, bool wait=true) |
Spawn a process and wait for it's exit code. More... | |
int | join (int pid) |
Get the exit status of another process, waiting for it to exit. More... | |
bool | cancel (int pid, int sig=0) |
Cancel a running child process. More... | |
const char* | getEnv (const char *name) |
Get system environment. More... | |
void | setEnv (const char *name, const char *value, bool overwrite) |
Set system environment in a standard manner. More... | |
const char* | getConfigDir (void) |
Get etc prefix path. More... | |
const char* | getHomeDir (void) |
Get home directory. More... | |
const char* | getUser (void) |
Get user name. More... | |
bool | setUser (const char *id, bool grp=true) |
Set user id by name. More... | |
bool | setGroup (const char *id) |
Set the effective group id by name. More... | |
size_t | getPageSize (void) |
Return the effective operating system page size. More... | |
void | setPriority (int pri) |
Used to set process priority and optionally enable realtime. More... | |
void | setScheduler (const char *policy) |
Used to set process scheduling policy. More... | |
void | setRealtime (int pri=0) |
Portable shortcut for setting realtime... More... | |
bool | isScheduler (void) |
Return true if scheduler settable. More... | |
bool | isRealtime (void) |
Return true if realtime scheduling. More... |
These are typically referenced thru Process::xxx static member functions. Many of these members are used both for win32 and posix systems although some may be platform specific.
|
|
|
Attach the current process to another device or i/o session. It is deamonified and dissasociated with the prior parent process and controlling terminal.
|
|
Cancel a running child process.
|
|
Detach current process into a daemon, posix only. Perhaps a similar method can be used for creating win32 "services"? |
|
Get etc prefix path.
|
|
Get system environment.
|
|
Get home directory.
|
|
Return the effective operating system page size.
|
|
Get user name.
|
|
Return true if realtime scheduling.
|
|
Return true if scheduler settable.
|
|
Get the exit status of another process, waiting for it to exit.
|
|
Lock a process in memory. Ideally you should be deep enough where additional memallocs for functions will not kill you, or use false for future.
|
|
Set system environment in a standard manner.
|
|
Set the effective group id by name.
|
|
Set system call interuptable signal handler. return previous handler.
|
|
Set a posix compliant signal handler.
|
|
Used to set process priority and optionally enable realtime.
|
|
Portable shortcut for setting realtime...
|
|
Used to set process scheduling policy.
|
|
Set user id by name.
|
|
Spawn a process and wait for it's exit code. In win32 this is done with the spawn system call. In posix, this is done with a fork, an execvp, and a waitpid.
|
|
Unlock process pages.
|