1 PSYSENTRY(3PROC) Process Control Library Functions PSYSENTRY(3PROC) 2 3 NAME 4 Psysentry, Psysexit - set system call entry and exit actions 5 6 LIBRARY 7 Process Control Library (libproc, -lproc) 8 9 SYNOPSIS 10 #include <libproc.h> 11 12 int 13 Psysentry(struct ps_prochandle *P, int which, int stop); 14 15 int 16 Psysexit(struct ps_prochandle *P, int which, int stop); 17 18 DESCRIPTION 19 The Psysentry() and Psysexit() functions controls what actions the 20 process handle P should take upon executing a system call. 21 22 The system allows a process to be stopped on both entry and exit of a 23 system call. For information on the state of the process when it is 24 stopped due to system call tracing, see the PCSENTRY and PCSEXIT sections 25 of proc(4). 26 27 The value of the stop parameter controls whether or not the system call 28 listed in which causes the process to stop. A value of non-zero 29 indicates the process should stop; a value of 0 indicates it should not. 30 31 The value of which indicates which system call the change applies to. A 32 value of 0 applies to all system calls. Note, the system does not supply 33 a stable mapping from system call names to identifiers. 34 35 These functions only apply to actively running processes. They do not 36 function on handles that refer to core files, zombie processes, or ELF 37 objects. 38 39 RETURN VALUES 40 Upon successful completion, the Psysentry() and Psysexit() functions 41 return the previous disposition of the system call -- 0 if it was not set 42 to stop and 1 if it was -- and the system call state is updated. 43 Otherwise, -1 is returned, errno is updated with the error that occurred, 44 and the system call state is not updated. 45 46 ERRORS 47 The Psysentry() and Psysexit() functions will fail if: 48 49 EINVAL The value of which is invalid, e.g. it is less than 50 zero or greater than the largest defined system call. 51 52 ENOENT The handle P refers to a process that is a zombie, a 53 core file, or an ELF object. 54 55 INTERFACE STABILITY 56 Uncommitted 57 58 Note, while the Psysentry() and Psysexit() functions are uncommitted, the 59 mapping of system calls to system call numbers is Not-an-Interface and 60 may change at any time. 61 62 MT-LEVEL 63 See LOCKING in libproc(3LIB). 64 65 SEE ALSO 66 libproc(3LIB), proc(4), attributes(5) 67 68 illumos May 11, 2016 illumos