priv_wait4 - wait for process termination |
#include <sys/resource.h> #include <privman.h> |
int priv_wait4(pid_t pid, int *status, int options, struct rusage *ruseage); |
The wait4 function suspends execution of the current process until a child as specified by the pid argument has exited, or until a signal is delivered whose action is to terminate the current process or to call a signal handling function. See wait4(2) for more details, as this method parallels that one. |
This method is only needed, or useful, for getting the return value of processes created by |
priv_rerunas(3) with the PRIV_RR_OLD_SLAVE_MONITORED flag set. The actual wait4 call happens in the Privman server. |
On success, the process ID of the child which exited is returned. -1 is returned in the case of failure, with errno set appropriately. |
See wait4(2) for more detail. |
priv_wait4 only works for processes that are created by priv_rerunas with the PRIV_RR_OLD_SLAVE_MONITORED flag set, which seems a silly reason for another method. |
Network Associates. Send email to <privman@nailabs.com> |
priv_daemon(3) priv_execve(3) priv_fopen(3) priv_popen(3) priv_fork(3) priv_init(3) privman_conf(5) priv_open(3) priv_pam(3) priv_rerunas(3) priv_respawn_as(3) privman(7) |