diff options
author | Tim Jenness <tjenness@cpan.org> | 2000-08-15 05:51:59 -1000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-16 13:22:35 +0000 |
commit | 7e03f963b2d8f2b5ba6cfc37a31934125cf2d8bf (patch) | |
tree | ecdedf3dd5c00b6740a7a7b82a022238580eb433 /lib/Cwd.pm | |
parent | 05d2a450021acf4e4872f27fe51044b573e5d96c (diff) | |
download | perl-7e03f963b2d8f2b5ba6cfc37a31934125cf2d8bf.tar.gz |
Cwd::_backtick_pwd does not check return value
Message-ID: <Pine.LNX.4.21.0008151547560.1223-100000@lapaki.jach.hawaii.edu>
p4raw-id: //depot/perl@6651
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r-- | lib/Cwd.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 9a92829da5..ecd088298b 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -81,8 +81,9 @@ require Exporter; # The 'natural and safe form' for UNIX (pwd may be setuid root) sub _backtick_pwd { - my $cwd; - chop($cwd = `pwd`); + my $cwd = `pwd`; + # `pwd` may fail e.g. if the disk is full + chomp($cwd) if defined $cwd; $cwd; } |