summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-07 02:03:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-07 02:03:34 +0000
commitb522bf068e1d0db0c7adc5726238584c2aaf623d (patch)
treecbc5fcd31a427658f9c26788fb1b5547dd40dcbd /lib
parentcd2dd2fd24b15028d265200a1345a2bbcef5a4d9 (diff)
downloadperl-b522bf068e1d0db0c7adc5726238584c2aaf623d.tar.gz
make Sys::Hostname safe against C<$SIG{CHLD}='IGNORE'> (suggested
by David Muir Sharnoff <muir@idiom.com>) p4raw-id: //depot/perl@3631
Diffstat (limited to 'lib')
-rw-r--r--lib/Sys/Hostname.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm
index 95f9a99a7a..e96822e414 100644
--- a/lib/Sys/Hostname.pm
+++ b/lib/Sys/Hostname.pm
@@ -94,6 +94,7 @@ sub hostname {
# method 3 - trusty old hostname command
|| eval {
local $SIG{__DIE__};
+ local $SIG{CHLD};
$host = `(hostname) 2>/dev/null`; # bsdish
}