PSYSENTRY(3PROC) Process Control Library Functions PSYSENTRY(3PROC)
NAME
Psysentry,
Psysexit - set system call entry and exit actions
LIBRARY
Process Control Library (libproc, -lproc)
SYNOPSIS
#include <libproc.h> int Psysentry(
struct ps_prochandle *P,
int which,
int stop);
int Psysexit(
struct ps_prochandle *P,
int which,
int stop);
DESCRIPTION
The
Psysentry() and
Psysexit() functions controls what actions the
process handle
P should take upon executing a system call.
The system allows a process to be stopped on both entry and exit of a
system call. For information on the state of the process when it is
stopped due to system call tracing, see the
PCSENTRY and
PCSEXIT sections of
proc(5).
The value of the
stop parameter controls whether or not the system call
listed in
which causes the process to stop. A value of non-zero
indicates the process should stop; a value of 0 indicates it should
not.
The value of
which indicates which system call the change applies to.
A value of 0 applies to all system calls. Note, the system does not
supply a stable mapping from system call names to identifiers.
These functions only apply to actively running processes. They do not
function on handles that refer to core files, zombie processes, or ELF
objects.
RETURN VALUES
Upon successful completion, the
Psysentry() and
Psysexit() functions
return the previous disposition of the system call --
0 if it was not
set to stop and
1 if it was -- and the system call state is updated.
Otherwise,
-1 is returned, errno is updated with the error that
occurred, and the system call state is not updated.
ERRORS
The
Psysentry() and
Psysexit() functions will fail if:
EINVAL The value of
which is invalid, e.g. it is less than
zero or greater than the largest defined system
call.
ENOENT The handle
P refers to a process that is a zombie, a
core file, or an ELF object.
INTERFACE STABILITY
Uncommitted Note, while the
Psysentry() and
Psysexit() functions are uncommitted,
the mapping of system calls to system call numbers is
Not-an-Interface and may change at any time.
MT-LEVEL See
LOCKING in
libproc(3LIB).
SEE ALSO
libproc(3LIB),
proc(5),
attributes(7)illumos May 11, 2016 illumos