PRIV_WAIT4(3) Subroutines PRIV_WAIT4(3)NAMEpriv_wait4 - wait for process termination
SYNOPSIS
#include <sys/resource.h>
#include <privman.h>
int priv_wait4(pid_t pid, int *status, int options, struct rusage
*ruseage);
DESCRIPTION
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.
RETURN VALUE
On success, the process ID of the child which exited is returned. -1
is returned in the case of failure, with errno set appropriately.
ERRORS
See wait4(2) for more detail.
BUGSpriv_wait4 only works for processes that are created by priv_rerunas
with the PRIV_RR_OLD_SLAVE_MONITORED flag set, which seems a silly rea‐
son for another method.
AUTHOR
Network Associates. Send email to <privman@nailabs.com>
SEE ALSOpriv_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)Unix SEPTEMBER 2002 PRIV_WAIT4(3)