Inheritance diagram for Ux::Process:
Definition at line 42 of file uxprocess.hpp.
Public Member Functions | |
Process (pid_t id=-1) | |
void | set (pid_t id) |
operator pid_t () | |
pid_t | getsid (void) |
void | kill (int signum) |
void | sigqueue (int signum, const union sigval value) |
pid_t | waitpid (ExitStatus *statusp=NULL, int options=0) |
Static Public Member Functions | |
void | abort (void) |
void | atexit (void(*fcn)(void)) |
void | chdir (const char *path) |
void | chdir (int fd) |
void | chroot (const char *path) |
clock_t | clock (void) |
void | execlp (const char *file, const char *arg0,...) |
void | execvpe (const char *file, char *const argv[], char *const *envv=NULL) |
void | _exit (int status=EXIT_SUCCESS) |
void | exit (int status=EXIT_SUCCESS) |
Process | fork (void) |
void | getcwd (Dir &d) |
gid_t | getegid (void) |
char * | getenv (const char *var) |
uid_t | geteuid (void) |
gid_t | getgid (void) |
pid_t | getpid (void) |
pid_t | getpgid (pid_t pid) |
pid_t | getppid (void) |
void | getrlimit (int resource, struct rlimit *rlp) |
void | getrusage (int who, struct rusage *r_usage) |
uid_t | getuid (void) |
void | kill (pid_t pid, int signum) |
void | nice (int incr) |
void | pause (void) |
void | putenv (char *string) |
void | setegid (gid_t gid) |
void | setenv (const char *var, const char *val, int overwrite) |
void | seteuid (uid_t uid) |
void | setgid (gid_t gid) |
void | setpgid (pid_t pid, pid_t pgid) |
void | setrlimit (int resource, const struct rlimit *rlp) |
pid_t | setsid (void) |
void | setuid (uid_t uid) |
void | sigaction (int signum, const struct sigaction *act, struct sigaction *oact=NULL) |
void | sigaltstack (const stack_t *stack, stack_t *ostack=NULL) |
void | siginterrupt (int signum, int on=true) |
void | sigprocmask (int how, const sigset_t *set, sigset_t *oset=NULL) |
void | sigsuspend (const sigset_t *sigmask) |
int | sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *ts) |
void | sigwait (const sigset_t *set, int *signum) |
int | sigwaitinfo (const sigset_t *set, siginfo_t *info=NULL) |
int | system (const char *command) |
clock_t | times (struct tms *buffer) |
mode_t | umask (mode_t cmask) |
void | unsetenv (const char *var) |
pid_t | wait (ExitStatus *statusp=NULL) |
void | waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options=0) |
pid_t | waitpid (pid_t pid, ExitStatus *statusp=NULL, int options=0) |
Protected Attributes | |
pid_t | pid |
|
Definition at line 47 of file uxprocess.hpp. References getpid(). Referenced by fork(). |
|
Calls _exit. Definition at line 71 of file uxprocess.hpp. |
|
Calls abort. Definition at line 58 of file uxprocess.hpp. |
|
Calls atexit. Definition at line 55 of file uxprocess.cpp. References errno. |
|
Calls fchdir. Definition at line 74 of file uxprocess.cpp. References errno. |
|
Calls chdir. Definition at line 65 of file uxprocess.cpp. References errno. |
|
Calls chroot. Definition at line 83 of file uxprocess.cpp. References errno. |
|
Calls clock. Definition at line 92 of file uxprocess.cpp. References errno. |
|
Calls execvp after building a vector from the arguments. (Not feasible to call execlp, as there's no portable way to pass it the arguments as a list.) Definition at line 110 of file uxprocess.cpp. References errno. |
|
Calls execvp, first setting the global environ to the argument if it's non-NULL. environ is restored if the call fails. Not thread safe, as setting and re-setting of environ isn't protected with a mutex. (It's not that important for an exec call to be thread safe, since calling it with more than one thread active is not good practice anyway.) Definition at line 139 of file uxprocess.cpp. |
|
Calls exit. Definition at line 76 of file uxprocess.hpp. |
|
Calls fork. Returns a Process, which is automatically converted to a pid_t if necessary. Definition at line 154 of file uxprocess.cpp. |
|
Calls getcwd. Dir argument must have space allocated with File::alloc, or at least the size and path members set properly. Definition at line 167 of file uxprocess.cpp. References errno, and Ux::File::get_size(). |
|
Calls getegid. Definition at line 83 of file uxprocess.hpp. References getegid(). |
|
Calls getenv. Does not throw error; returns NULL if not found. Definition at line 179 of file uxprocess.cpp. References getenv(). |
|
Calls geteuid. Definition at line 89 of file uxprocess.hpp. References geteuid(). |
|
Calls getgid. Definition at line 94 of file uxprocess.hpp. References getgid(). |
|
Calls getpgid. Definition at line 187 of file uxprocess.cpp. References errno. |
|
Calls getpid. Definition at line 99 of file uxprocess.hpp. References getpid(). Referenced by Process(). |
|
Calls getppid. Definition at line 105 of file uxprocess.hpp. References getppid(). |
|
Calls getrlimit. Definition at line 199 of file uxprocess.cpp. References errno. |
|
Calls getrusage. Definition at line 208 of file uxprocess.cpp. References errno. |
|
Calls getsid, for this process. getsid(0) (getsid of calling process) not implemented and not needed, since a Process is initialized to the calling process by default. Definition at line 219 of file uxprocess.cpp. |
|
Calls getuid. Definition at line 113 of file uxprocess.hpp. References getuid(). |
|
Calls kill. Definition at line 119 of file uxprocess.hpp. References kill(). |
|
Calls kill. Definition at line 231 of file uxprocess.cpp. References errno. Referenced by kill(). |
|
Calls nice. Definition at line 240 of file uxprocess.cpp. References errno. |
|
Definition at line 52 of file uxprocess.hpp. |
|
Calls pause. Definition at line 249 of file uxprocess.cpp. References errno. |
|
Calls putenv. Definition at line 258 of file uxprocess.cpp. References errno. |
|
Definition at line 50 of file uxprocess.hpp. |
|
Calls setegid. Definition at line 267 of file uxprocess.cpp. References errno. |
|
Calls setenv. Definition at line 276 of file uxprocess.cpp. |
|
Calls seteuid. Definition at line 289 of file uxprocess.cpp. References errno. |
|
Calls setgid. Definition at line 298 of file uxprocess.cpp. References errno. |
|
Calls setpgid. Definition at line 307 of file uxprocess.cpp. References errno. |
|
Calls setrlimit. Definition at line 316 of file uxprocess.cpp. References errno. |
|
Calls setsid. Definition at line 325 of file uxprocess.cpp. References errno. |
|
Calls setuid. Definition at line 337 of file uxprocess.cpp. References errno. |
|
Calls sigaction. Definition at line 346 of file uxprocess.cpp. References errno. |
|
Calls sigaltstack. Definition at line 355 of file uxprocess.cpp. References errno. |
|
Calls siginterrupt. Definition at line 364 of file uxprocess.cpp. References errno. |
|
Calls sigprocmask. Definition at line 373 of file uxprocess.cpp. |
|
Calls sigqueue. Definition at line 382 of file uxprocess.cpp. |
|
Calls sigsuspend. Definition at line 395 of file uxprocess.cpp. References errno. |
|
Calls sigtimedwait. Definition at line 405 of file uxprocess.cpp. |
|
Calls sigwait. Definition at line 422 of file uxprocess.cpp. |
|
Calls sigwaitinfo. Definition at line 436 of file uxprocess.cpp. |
|
Calls system. Definition at line 453 of file uxprocess.cpp. References errno. |
|
Calls times. Definition at line 465 of file uxprocess.cpp. References errno. |
|
Calls umask. Definition at line 147 of file uxprocess.hpp. References umask(). |
|
Calls unsetenv. Definition at line 477 of file uxprocess.cpp. References errno. |
|
Calls wait. Definition at line 153 of file uxprocess.hpp. References waitpid(). |
|
Calls waitid if it's supported. Otherwise throws ENOSYS. Definition at line 492 of file uxprocess.cpp. References errno. |
|
Calls waitpid. The static version takes a pid_t argument in case you want to wait for other than the calling process. Definition at line 161 of file uxprocess.hpp. References waitpid(). |
|
Calls waitpid. Use the inline version if you want to operate on the Process object's process ID. Definition at line 506 of file uxprocess.cpp. References errno, and Ux::ExitStatus::set(). |
|
Definition at line 44 of file uxprocess.hpp. Referenced by getsid(), and sigqueue(). |