develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH] perlfunc return-value addition for chroot(), etc.

Thread Next
From:
Jeffrey Friedl
Date:
July 29, 2001 22:17
Subject:
[PATCH] perlfunc return-value addition for chroot(), etc.
Message ID:
200107300516.WAA19778@ventrue.corp.yahoo.com

My brother was confused due to chroot()'s return status being opposite
of the system call's, so I added

  Returns true upon success, otherwise returns false and sets C<$!> (errno).

to the doc. A quick scan of the code showed two other similar situations.
Patch appended.
        Jeffrey


--- .orig/pod/perlfunc.pod	Tue Jul 17 02:08:25 2001
+++ pod/perlfunc.pod	Sun Jul 29 22:14:58 2001
@@ -702,4 +702,5 @@
 reasons, this call is restricted to the superuser.  If FILENAME is
 omitted, does a C<chroot> to C<$_>.
+Returns true upon success, otherwise returns false and sets C<$!> (errno).
 
 =item close FILEHANDLE
@@ -4103,4 +4104,5 @@
 accept any arguments, so only C<setpgrp(0,0)> is portable.  See also
 C<POSIX::setsid()>.
+Returns true upon success, otherwise returns false and sets C<$!> (errno).
 
 =item setpriority WHICH,WHO,PRIORITY
@@ -4109,4 +4111,5 @@
 (See setpriority(2).)  Will produce a fatal error if used on a machine
 that doesn't implement setpriority(2).
+Returns true upon success, otherwise returns false and sets C<$!> (errno).
 
 =item setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About