fix setpgrp vs getpgrp and POSIX vs BSD confusion (spotted by
authorGurusamy Sarathy <gsar@cpan.org>
Thu, 7 Oct 1999 23:51:38 +0000 (23:51 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Thu, 7 Oct 1999 23:51:38 +0000 (23:51 +0000)
Brian Mitchell <brian@chele.cais.net>)

p4raw-id: //depot/perl@4310

pod/perldiag.pod
pod/perlfunc.pod
pp_sys.c

index b35d260..d0f1be8 100644 (file)
@@ -2369,7 +2369,7 @@ perspective, it's probably not what you intended.
 
 =item POSIX getpgrp can't take an argument
 
-(F) Your C compiler uses POSIX getpgrp(), which takes no argument, unlike
+(F) Your system has POSIX getpgrp(), which takes no argument, unlike
 the BSD version, which takes a pid.
 
 =item Possible Y2K bug: %s
@@ -2682,6 +2682,11 @@ think so.
 the seteuid() system call (or equivalent), or at least Configure didn't
 think so.
 
+=item setpgrp can't take arguments
+
+(F) Your system has the setpgrp() from BSD 4.2, which takes no arguments,
+unlike POSIX setpgid(), which takes a process ID and process group ID.
+
 =item setrgid() not implemented
 
 (F) You tried to assign to C<$(>, and your operating system doesn't support
index d07ded3..c69c1cb 100644 (file)
@@ -3697,9 +3697,10 @@ See L<perlipc/"UDP: Message Passing"> for examples.
 
 Sets the current process group for the specified PID, C<0> for the current
 process.  Will produce a fatal error if used on a machine that doesn't
-implement setpgrp(2).  If the arguments are omitted, it defaults to
-C<0,0>.  Note that the POSIX version of C<setpgrp> does not accept any
-arguments, so only C<setpgrp(0,0)> is portable.  See also C<POSIX::setsid()>.
+implement POSIX setpgid(2) or BSD setpgrp(2).  If the arguments are omitted,
+it defaults to C<0,0>.  Note that the BSD 4.2 version of C<setpgrp> does not
+accept any arguments, so only C<setpgrp(0,0)> is portable.  See also
+C<POSIX::setsid()>.
 
 =item setpriority WHICH,WHO,PRIORITY
 
index 2963d2f..12b3ef9 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3808,7 +3808,7 @@ PP(pp_setpgrp)
     SETi( BSD_SETPGRP(pid, pgrp) >= 0 );
 #else
     if ((pgrp != 0 && pgrp != getpid()) || (pid != 0 && pid != getpid()))
-       DIE(aTHX_ "POSIX setpgrp can't take an argument");
+       DIE(aTHX_ "setpgrp can't take an argument");
     SETi( setpgrp() >= 0 );
 #endif /* USE_BSDPGRP */
     RETURN;