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

Psetflags, Punsetflagsset and unset process flags

Process Control Library (libproc, -lproc)

#include <libproc.h>

int
Psetflags(struct ps_prochandle *P, long flags);

int
Punsetflags(struct ps_prochandle *P, long flags);

The () and Punsetflags() functions manipulate the process flags for the process handle P. The process flags determine how the process behaves in the face of various actions. For example, setting the flag indicates that the tracing flags of the process and the inherit-on-fork mode should be set on children. A full list of the process flags is available in the section in proc(5).

The () function sets the flags specified in flags by doing a bitwise-inclusive-OR with the previously set flags.

The () function removes the flags specified in flags from the tracing flags of the process. Items not listed in flags will remain.

To see the current set of flags active on the process, check the member of the for the process. It can be obtained through the Pstatus(3PROC) function.

Note, attempting to modify the process flags only works on active processes. Attempting to call these functions of process handles corresponding to core files, zombie processes, or files, will result in an error.

Upon successful completion, the Psetflags() and Punsetflags() functions return . Otherwise, is returned and is set to indicate the error.

For a full list of possible errors see the section in proc(5).

See in libproc(3LIB).

libproc(3LIB), Pstatus(3PROC), proc(5)

May 11, 2016 OmniOS