PREOPEN(3PROC) Process Control Library Functions PREOPEN(3PROC)

Preopenreopen a process

Process Control Library (libproc, -lproc)

#include <libproc.h>

Preopen(struct ps_prochandle *P);

The () function is used to regain control of the process represented by the handle P. A loss of control is indicated by the Pstatus(3PROC) function returning the value PS_LOST. This may occur when the controlled process performs an exec(2) of a setuid or setgid binary or one where the controlling process cannot read the object file. For more information on this, see the section of proc(5).

If successful, the controlling process will obtain control of the process specified by P. If it fails, the controlling process should release the handle with Prelease(3PROC). Note there are occasions where due to permissions it may not be possible to obtain control again.

Upon successful completion, the Preopen() function returns Otherwise, is returned.

See in libproc(3LIB).

exec(2), libproc(3LIB), Prelease(3PROC), Pstatus(3PROC), proc(5)

May 11, 2016 OmniOS