(BSD System Compatibility)

killpg(3bsd)


killpg -- (BSD) send signal to a process group

Synopsis

   /usr/ucb/cc [flag . . . ] file . . .
   

int killpg(int pgrp, int sig);

Description

killpg sends the signal sig to the process group pgrp. See sigvec(3bsd) 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.

Return values

Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global variable errno is set to indicate the error.

killpg will fail and no signal will be sent if any of the following occur:


EINVAL
sig is not a valid signal number.

ESRCH
No processes were found in the specified process group.

EPERM
The effective user ID of the sending process is not 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.

References

kill(2), setpgrp(2), sigaction(2), sigvec(3bsd)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004