|PROC_GET_SIGACT(3PROC)||Process Control Library Functions||PROC_GET_SIGACT(3PROC)|
struct sigaction **sigact, size_t
proc_get_sigact() function is a convenient way to read the /proc sigact file for the process pid.
If *sigact is not NULL, the contents of *sigact is populated with the contents of the sigact file, up to *np entries. If *np is larger than the number of entries read, the contents beyond the last entry read are not modified.
If *sigact is NULL,
proc_get_sigact() allocates a buffer sufficiently
large to hold the entries from the sigact file,
populates the newly allocated buffer with the contents of the
sigact file, and sets *sigact
to point to the newly allocated buffer. When this occurs, the caller is
responsible for freeing the buffer.
In either situation, *np is set to the actual number of struct sigaction entries written from the sigact file into *sigact.
proc_get_sigactfunction returns 0. Otherwise -1 is returned to indicate an error occurred.
|April 15, 2020||illumos|