From: Jarkko Hietaniemi Date: Thu, 27 Sep 2001 11:15:51 +0000 (+0000) Subject: Integrate changes #12241 and #12242 from macperl: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=97c10e7733209f2a73e1d4b214196ecbe19275b2;p=p5sagit%2Fp5-mst-13.2.git Integrate changes #12241 and #12242 from macperl: Remove unneeded disabling of umask() calls Note (get|set)sockopt are available. p4raw-link: @12241 on //depot/maint-5.6/macperl: 113e0f7d7f04be69474441a252121e8e322dfb7e p4raw-id: //depot/perl@12245 p4raw-integrated: from //depot/maint-5.6/macperl@12244 'copy in' lib/File/Temp.pm (@11813..) pod/perlport.pod (@12214..) --- diff --git a/lib/File/Temp.pm b/lib/File/Temp.pm index 3248a96..97b2895 100644 --- a/lib/File/Temp.pm +++ b/lib/File/Temp.pm @@ -452,10 +452,10 @@ sub _gettemp { local $^F = 2; # Store callers umask - my $umask = umask() unless ($^O eq 'MacOS'); + my $umask = umask(); # Set a known umask - umask(066) unless ($^O eq 'MacOS'); + umask(066); # Attempt to open the file my $open_success = undef; @@ -472,14 +472,14 @@ sub _gettemp { if ( $open_success ) { # Reset umask - umask($umask) unless ($^O eq 'MacOS'); + umask($umask); # Opened successfully - return file handle and name return ($fh, $path); } else { # Reset umask - umask($umask) unless ($^O eq 'MacOS'); + umask($umask); # Error opening file - abort with error # if the reason was anything but EEXIST @@ -494,22 +494,22 @@ sub _gettemp { } elsif ($options{"mkdir"}) { # Store callers umask - my $umask = umask() unless ($^O eq 'MacOS'); + my $umask = umask(); # Set a known umask - umask(066) unless ($^O eq 'MacOS'); + umask(066); # Open the temp directory if (mkdir( $path, 0700)) { # created okay # Reset umask - umask($umask) unless ($^O eq 'MacOS'); + umask($umask); return undef, $path; } else { # Reset umask - umask($umask) unless ($^O eq 'MacOS'); + umask($umask); # Abort with error if the reason for failure was anything # except EEXIST diff --git a/pod/perlport.pod b/pod/perlport.pod index e4a50b0..8e94e22 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -1572,7 +1572,7 @@ is used directly as Perl's exit status. (VMS) =item getsockopt SOCKET,LEVEL,OPTNAME -Not implemented. (S, Plan9) +Not implemented. (Plan9) =item glob EXPR @@ -1690,7 +1690,7 @@ Not implemented. (MPE/iX, Win32) =item setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL -Not implemented. (S, Plan9) +Not implemented. (Plan9) =item shmctl ID,CMD,ARG