From: Gurusamy Sarathy Date: Wed, 7 Jul 1999 02:03:34 +0000 (+0000) Subject: make Sys::Hostname safe against C<$SIG{CHLD}='IGNORE'> (suggested X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b522bf068e1d0db0c7adc5726238584c2aaf623d;p=p5sagit%2Fp5-mst-13.2.git make Sys::Hostname safe against C<$SIG{CHLD}='IGNORE'> (suggested by David Muir Sharnoff ) p4raw-id: //depot/perl@3631 --- diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm index 95f9a99..e96822e 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 }