From: Gurusamy Sarathy Date: Thu, 7 Oct 1999 23:51:38 +0000 (+0000) Subject: fix setpgrp vs getpgrp and POSIX vs BSD confusion (spotted by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=817772988d05004281dc7172d155e44cb7f06bff;p=p5sagit%2Fp5-mst-13.2.git fix setpgrp vs getpgrp and POSIX vs BSD confusion (spotted by Brian Mitchell ) p4raw-id: //depot/perl@4310 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index b35d260..d0f1be8 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -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 diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d07ded3..c69c1cb 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3697,9 +3697,10 @@ See L 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 does not accept any -arguments, so only C is portable. See also C. +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 does not +accept any arguments, so only C is portable. See also +C. =item setpriority WHICH,WHO,PRIORITY diff --git a/pp_sys.c b/pp_sys.c index 2963d2f..12b3ef9 100644 --- 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;