summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-05-30 21:53:11 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-05-30 21:53:11 +0000
commit2f889564dc71a1a06841aed4ec66aa00d49e64a5 (patch)
treeddc899318e70ca5879aedd67e661dc2d6eb08b7a
parentafc36869f5ece6654bde1e92c0bd75a333d6ae17 (diff)
add getpgrp(2) from NetBSD
-rw-r--r--lib/libc/sys/Makefile.inc4
-rw-r--r--lib/libc/sys/getpgrp.211
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 70270b18d83..b3af836f35c 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.22 1997/05/08 20:10:06 kstailey Exp $
+# $OpenBSD: Makefile.inc,v 1.23 1997/05/30 21:53:10 kstailey Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
@@ -23,6 +23,7 @@ ASM= accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \
fchflags.o fchmod.o fchown.o fcntl.o flock.o fpathconf.o fstat.o \
fstatfs.o fsync.o futimes.o getdirentries.o getegid.o geteuid.o \
getfh.o getfsstat.o getgid.o getgroups.o getitimer.o getpeername.o \
+ getpgid.o \
getpgrp.o getpid.o getppid.o getpriority.o getrlimit.o getrusage.o \
getsockname.o getsockopt.o gettimeofday.o getuid.o issetugid.o \
ioctl.o kill.o \
@@ -145,6 +146,7 @@ MLINKS+=clock_gettime.2 clock_getres.2
MLINKS+=getgid.2 getegid.2
MLINKS+=getitimer.2 setitimer.2
MLINKS+=getlogin.2 setlogin.2
+MLINKS+=getpgrp.2 getpgid.2
MLINKS+=getpid.2 getppid.2
MLINKS+=getpriority.2 setpriority.2
MLINKS+=getrlimit.2 setrlimit.2
diff --git a/lib/libc/sys/getpgrp.2 b/lib/libc/sys/getpgrp.2
index 9d5f54da911..d6cd55afe1c 100644
--- a/lib/libc/sys/getpgrp.2
+++ b/lib/libc/sys/getpgrp.2
@@ -1,3 +1,4 @@
+.\" $OpenBSD: getpgrp.2,v 1.2 1997/05/30 21:53:10 kstailey Exp $
.\" $NetBSD: getpgrp.2,v 1.8 1995/02/27 12:33:09 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -43,9 +44,15 @@
.Fd #include <unistd.h>
.Ft pid_t
.Fn getpgrp "void"
+.Ft pid_t
+.Fn getpgid "pid_t pid"
.Sh DESCRIPTION
The process group of the current process is returned by
.Fn getpgrp .
+The process group of the
+.Fa pid
+process is returned by
+.Fn getpgid .
.Pp
Process groups are used for distribution of signals, and
by terminals to arbitrate requests for their input: processes
@@ -77,6 +84,10 @@ The
.Fn getpgrp
function conforms to
.St -p1003.1-88 .
+The
+.Fn getpgid
+function call is derived from it's usage in System V Release 4, and
+first appeared in NetBSD 1.2A.
.Sh COMPATIBILITY
This version of
.Fn getpgrp