PSYSENTRY(3PROC) | Process Control Library Functions | PSYSENTRY(3PROC) |
Psysentry
,
Psysexit
— set system call
entry and exit actions
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Psysentry
(struct ps_prochandle
*P, int which, int
stop);
int
Psysexit
(struct ps_prochandle
*P, int which, int
stop);
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.
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.
The Psysentry
() and
Psysexit
() functions will fail if:
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.
See LOCKING in libproc(3LIB).
May 11, 2016 | OmniOS |