Files
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

73 lines
1.5 KiB
Groff

.\" @(#)killpg.2 1.1 94/10/31 SMI; from UCB 4.2
.TH KILLPG 2 "21 January 1990"
.SH NAME
killpg \- send signal to a process group
.SH SYNOPSIS
.nf
.ft B
int killpg(pgrp, sig)
int pgrp, sig;
.ft R
.fi
.IX killpg() "" "\fLkillpg()\fP \(em send signal to process group"
.IX signals killpg() "" "\fLkillpg()\fP \(em send to process group"
.IX "process group" "send signal to \(em \fLkillpg()\fR"
.IX send "signal to process group \(em \fLkillpg()\fR"
.SH DESCRIPTION
.B killpg(\|)
sends the signal
.I sig
to the process group
.IR pgrp .
See
.BR sigvec (2)
for a list of signals.
.LP
The real or effective user
.SM ID
of the sending process must match the real or saved set-user
.SM ID
of the receiving process, unless the effective user
.SM ID
of the sending process is super-user.
A single exception is the signal
.SM
.BR SIGCONT \s0,
which may always be sent to any descendant of the current process.
.SH RETURN VALUES
.B killpg(\|)
returns:
.TP
0
on success.
.TP
\-1
on failure and sets
.B errno
to indicate the error.
.SH ERRORS
.B killpg(\|)
will fail and no signal will be sent if any of
the following occur:
.TP 15
.SM EINVAL
.I sig
was not a valid signal number.
.TP
.SM EPERM
The effective user
.SM ID
of the sending process was not super-user, and neither its real nor
effective user
.SM ID
matched the real or saved set-user
.SM ID
of one or more of the target processes.
.TP
.SM ESRCH
No processes were found in the specified process group.
.SH "SEE ALSO"
.BR kill (2V),
.BR getpgrp (2V),
.BR sigvec (2)