.\" SUCH DAMAGE.
.\"
.\" @(#)killpg.2 8.1 (Berkeley) 6/2/93
-.\" $FreeBSD: src/lib/libc/compat-43/killpg.2,v 1.6.2.3 2001/12/14 18:33:49 ru Exp $
+.\" $FreeBSD: src/lib/libc/compat-43/killpg.2,v 1.12 2002/12/19 09:40:21 ru Exp $
.\"
.Dd June 2, 1993
.Dt KILLPG 2
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
.In signal.h
.Ft int
.Fn killpg "pid_t pgrp" "int sig"
.Sh DESCRIPTION
-.Fn Killpg
+The
+.Fn killpg
+function
sends the signal
.Fa sig
to the process group
.Sh RETURN VALUES
.Rv -std killpg
.Sh ERRORS
-.Fn Killpg
+The
+.Fn killpg
+function
will fail and no signal will be sent if:
.Bl -tag -width Er
.It Bq Er EINVAL
-.Fa Sig
+The
+.Fa sig
+argument
is not a valid signal number.
+.It Bq Er EPERM
+The sending process is not the super-user and one or more
+of the target processes has an effective user ID different from that
+of the sending process.
.It Bq Er ESRCH
No process can be found in the process group specified by
.Fa pgrp .
.It Bq Er ESRCH
The process group was given as 0
but the sending process does not have a process group.
-.It Bq Er EPERM
-The sending process is not the super-user and one or more
-of the target processes has an effective user ID different from that
-of the sending process.
.El
+.Sh LEGACY SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <signal.h>
+.Pp
+The include file
+.In sys/types.h
+is necessary.
.Sh SEE ALSO
.Xr getpgrp 2 ,
.Xr kill 2 ,
-.Xr sigaction 2
+.Xr sigaction 2 ,
+.Xr compat 5
.Sh HISTORY
The
.Fn killpg
-function call appeared in
+function appeared in
.Bx 4.0 .