Go to the source code of this file.
|
bool | UTisValidPid (pid_t pid) |
|
UT_API int | UTchangeProcessGroup (pid_t pid, pid_t gpid) |
|
UT_API pid_t | UTspawnvp (const char *const *args, int detachConsole=0, bool ignore_output=false, bool change_process_group=false) |
|
UT_API pid_t | UTspawn (const char *string, int detachConsole=0, bool ignore_output=false, bool change_process_group=false) |
|
UT_API int | UTwait (pid_t pid) |
|
UT_API bool | UTwait (pid_t pid, int &exit_code) |
|
UT_API int | UTisRunning (pid_t pid, int *exit_code) |
|
UT_API int | UTisAnyProcessRunning (pid_t pid) |
|
UT_API bool | UTcheckProcessId (pid_t pid) |
|
UT_API pid_t | UTbackground (const char *name, int full_daemon=0) |
|
UT_API void | UTforeground (const char *name="Console") |
|
UT_API void | UTkill (pid_t pid, bool kill_tree=false) |
|
UT_API void | UTkill (pid_t pid, bool kill_tree, bool dump_stack) |
|
UT_API void | UTterminate (pid_t pid, bool terminate_tree=false) |
|
#define INVALID_PID (pid_t)-1 |
typedef void(* UTsysWaitLoop)(int state) |
UT_API pid_t UTbackground |
( |
const char * |
name, |
|
|
int |
full_daemon = 0 |
|
) |
| |
UT_API int UTchangeProcessGroup |
( |
pid_t |
pid, |
|
|
pid_t |
gpid |
|
) |
| |
Set process group ID for a given pid. With pid==0 and gpid==0 this will set a new process group for the current process.
- Returns
- 0 if successful or -1 on error.
UT_API bool UTcheckProcessId |
( |
pid_t |
pid | ) |
|
UT_API void UTforeground |
( |
const char * |
name = "Console" | ) |
|
UT_API int UTisAnyProcessRunning |
( |
pid_t |
pid | ) |
|
bool UTisValidPid |
( |
pid_t |
pid | ) |
|
|
inline |
UT_API void UTkill |
( |
pid_t |
pid, |
|
|
bool |
kill_tree = false |
|
) |
| |
Kill a process (using SIGKILL on Irix/Linux, TerminateProcess on NT). The NT version also closes the process handle.
UT_API void UTkill |
( |
pid_t |
pid, |
|
|
bool |
kill_tree, |
|
|
bool |
dump_stack |
|
) |
| |
Kill a process (using SIGKILL on Irix/Linux, TerminateProcess on NT), attempting to do a stack trace on the (parent) process to stderr. The NT version also closes the process handle
UT_API pid_t UTspawn |
( |
const char * |
string, |
|
|
int |
detachConsole = 0 , |
|
|
bool |
ignore_output = false , |
|
|
bool |
change_process_group = false |
|
) |
| |
UT_API pid_t UTspawnvp |
( |
const char *const * |
args, |
|
|
int |
detachConsole = 0 , |
|
|
bool |
ignore_output = false , |
|
|
bool |
change_process_group = false |
|
) |
| |
UT_API void UTterminate |
( |
pid_t |
pid, |
|
|
bool |
terminate_tree = false |
|
) |
| |
Kills a process (using SIGTERM on Irix/Linux, TerminateProcess on NT) The NT version also closes the process handle.
UT_API bool UTwait |
( |
pid_t |
pid, |
|
|
int & |
exit_code |
|
) |
| |
Wait for a spawned process to exit. If the wait system call is interrupted, the exit status will not be written and the function will return false.