KILLPG(3C) | Standard C Library Functions | KILLPG(3C) |
killpg - send signal to a process group
#include <signal.h> int killpg(pid_t pgrp, int sig);
The killpg() function sends the signal sig to the process group pgrp. See signal.h(3HEAD) for a list of signals.
The real or effective user ID of the sending process must match the real or saved set-user ID of the receiving process, unless the effective user ID of the sending process is the privileged user. A single exception is the signal SIGCONT, which may always be sent to any descendant of the current process.
Upon successful completion, 0 is returned. Otherwise, −1 is returned and errno is set to indicate the error.
The killpg() function will fail and no signal will be sent if:
EINVAL
EPERM
ESRCH
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Standard |
MT-Level | MT-Safe |
kill(2), setpgrp(2), sigaction(2), signal.h(3HEAD), attributes(7), standards(7)
July 24, 2002 | OmniOS |