GETPFLAGS(2) | System Calls | GETPFLAGS(2) |
getpflags, setpflags - get or set process flags
#include <sys/types.h> #include <priv.h> uint_t getpflags(uint_t flag);
int setpflags(uint_t flag, uint_t value);
The getpflags() and setpflags() functions obtain and modify the current per-process flags.
The following values for flag are supported:
PRIV_AWARE
PRIV_AWARE_RESET
This flag gets automatically reset when a file becomes privilege aware, either through calling setppriv(2) or by setting PRIV_AWARE to 1.
PRIV_DEBUG
NET_MAC_AWARE
NET_MAC_AWARE_INHERIT
The NET_MAC_AWARE_INHERIT flag controls the propagation of the NET_MAC_AWARE flag. When a process performs one of the exec(2) functions, the NET_MAC_AWARE flag is unset unless the NET_MAC_AWARE_INHERIT is set. NET_MAC_AWARE_INHERIT is always unset on one of the exec functions. The PRIV_NET_MAC_AWARE privilege is required to set either of these flags.
The getpflags() returns the value associated with a given per-process flag. If the flag argument is invalid, (uint_t)-1 is returned and errno is set to indicate the error.
Upon successful completion, setpflags() returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
The getpflags() and setpflags() functions will fail if:
EINVAL
The setpflags() function will fail if:
EPERM
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
MT-Level | Async-Signal-Safe |
June 4, 2009 | OmniOS |