diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-05-08 07:46:27 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-05-08 07:46:27 +0000 |
commit | 2f7761667674393d6c92fe71f745c5593f434b9a (patch) | |
tree | 5b3103b58d98350544e697e20c55cee27d6ac2b5 /lib | |
parent | 75a66ebd441b58957cee49c549d5316efb3df87c (diff) |
Update DESCRIPTION, ERRORS, SEE ALSO, and STANDARDS sections
(setpgid has *never* cared about euid in OpenBSD)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/setpgid.2 | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/libc/sys/setpgid.2 b/lib/libc/sys/setpgid.2 index 1143b83bf6a..064c3365716 100644 --- a/lib/libc/sys/setpgid.2 +++ b/lib/libc/sys/setpgid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: setpgid.2,v 1.12 2007/05/31 19:19:33 jmc Exp $ +.\" $OpenBSD: setpgid.2,v 1.13 2013/05/08 07:46:26 guenther Exp $ .\" $NetBSD: setpgid.2,v 1.8 1995/02/27 12:36:55 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)setpgid.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: May 8 2013 $ .Dt SETPGID 2 .Os .Sh NAME @@ -55,10 +55,6 @@ is zero, then the call applies to the current process. If .Ar pgrp is zero, the process ID of the specified process is used. -.Pp -If the invoker is not the superuser, then the affected process -must have the same effective user ID as the invoker or be a descendant -of the invoking process. .Sh RETURN VALUES .Fn setpgid returns 0 when the operation was successful. @@ -79,17 +75,25 @@ The value of the .Fa pgrp argument is less than zero. .It Bq Er EPERM -The effective user ID of the requested process is different -from that of the caller and the process is not a descendant -of the calling process. +The requested process is a descendant of the calling process, and +is either a session leader or not in the same session as the calling +process. +.It Bq Er EPERM +The value of the +.Fa pgid +argument is neither the PID of the process indicated by the +.Fa pid +argument nor the process group ID of an existing process group in +the same session as the calling process. .It Bq Er ESRCH The value of the .Fa pid argument does not match the process ID of the calling process or of a -child process of the calling process. +descendant of the calling process. .El .Sh SEE ALSO .Xr getpgrp 2 +.Xr setsid 2 .Sh STANDARDS .Fn setpgrp is identical to @@ -101,4 +105,4 @@ versions of The .Fn setpgid function conforms to -.St -p1003.1-88 . +.St -p1003.1-2008 . |