send signal to a process group
cc . . . -lc
int killpg(pid_t pgrp, int sig);
The killpg function sends the signal sig to the
process group pgrp. See
for a list of signals.
If pgrp is greater than 1, the following calls are
Upon successful completion, a value of 0 is returned. Otherwise, it
returns -1 and errno is set to indicate the error.
killpg will fail and no signal will be sent if
any of the following occur:
sig is an invalid or unsupported signal number.
The effective user ID of the sending process is not that
of a privileged user, and neither its real nor effective user
ID matches the real or saved set-user ID of one
or more of the target processes.
No process group was found to correspond with the value of
killpg is conformant with:
X/Open Portability Guide Issue 4, Version 2 (Spec-1170).
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003