Name

killpg — send signal to all members of a process group

Synopsis

#include <signal.h>
int killpg( pid_t   pgrp,
  int   signal);

DESCRIPTION

The killpg() function causes signal signal to be sent to all the processes in the process group pgrp or to the processes' own process group if pgrp is equal to zero.

If pgrp is greater than 1, it is equivalent to:

kill(−pgrp , signal);

RETURN VALUE

The value returned is −1 on error, or 0 for success.

ERRORS

Errors are returned in errno and can be one of the following:

EINVAL

for an invalid signal,

EPERM

if the userid of the calling process is not equal to that of the process the signal is sent to, and the userid is not that of the superuser.

ESRCH

for a process group which does not exist, and

CONFORMING TO

SUSv2, POSIX.1-2001

SEE ALSO

kill(2), signal(2), sigqueue(2), signal(7)


  (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Since the Linux kernel and libraries are constantly changing, this
manual page may be incorrect or out-of-date.  The author(s) assume no
responsibility for errors or omissions, or for damages resulting from
the use of the information contained herein.  The author(s) may not
have taken the same level of care in the production of this manual,
which is licensed free of charge, as they might when working
professionally.

Formatted or processed versions of this manual, if unaccompanied by
the source, must acknowledge the copyright and authors of this work.
License.
Modified Sat Jul 24 19:04:55 1993 by Rik Faith (faith@cs.unc.edu)
Modified 2004-11-11, Michael Kerrisk, <mtk-manpages@gmx.net>