1
0
Files
irix-657m-src/eoe/man/man3b/killpg.3b
2022-09-29 17:59:04 +03:00

90 lines
2.2 KiB
Plaintext

'\"macro stdmacro
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)killpg.2 6.3 (Berkeley) 5/14/86
.\"
.TH KILLPG 3B
.UC 4
.SH NAME
killpg \- send signal to a process group (4.3BSD)
.SH SYNOPSIS
.B #include <signal.h>
.PP
.B int killpg(pid_t pgrp, int sig);
.ft 1
.PP
To use any of the
.SM BSD
signal routines
(\f2kill\fP(3B), \f2killpg\fP(3B), \f2sigblock\fP(3B), \f2signal\fP(3B),
\f2sigpause\fP(3B), \f2sigsetmask\fP(3B), \f2sigstack\fP(2B), \f2sigvec\fP(3B))
you must either
.IP 1) 3
#define
.SM \f3_BSD_SIGNALS\fP
or
.SM \f3_BSD_COMPAT\fP
before including <\f2signal.h\fP>,
or
.IP 2) 3
specify one of them in the compile
command or makefile:
.Ex
cc -D_BSD_SIGNALS -o prog prog.c
.Ee
.SH DESCRIPTION
.I killpg
sends the signal
.I sig
to the process group
.IR pgrp .
See
.IR sigvec (3B)
for a list of signals.
.PP
The sending process and members of the process group must
have the same effective user \s-1ID\s+1, or
the sender must be the super-user.
As a single special case the continue signal
.SM
.B SIGCONT
may be sent
to any process that is a descendant of the current process.
.SH "RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise,
a value of \-1 is returned and the global variable \f2errno\fP
is set to indicate the error.
.SH "ERRORS
\f2killpg\fP will fail and no signal will be sent if any of the
following occur:
.TP 15
.SM
\%[EINVAL]
\f2Sig\fP is not a valid signal number.
.TP 15
.SM
\%[ESRCH]
No process can be found in the process group specified by \f2pgrp\fP.
.TP 15
.SM
\%[ESRCH]
The process group was given as 0
but the sending process does not have a process group.
.TP 15
.SM
\%[EPERM]
The sending process is not the super-user and one or more
of the target processes has an effective user
.SM ID
different from that
of the sending process.
.SH "SEE ALSO"
kill(3B), getpgrp(2), sigvec(3B)
.ne 5
.SH "WARNING (IRIX)"
The 4.3\s-1BSD\s+1 and System V signal facilities have different semantics.
Using both facilities in the same program is \f3strongly discouraged\fP
and will result in unpredictable behavior.