From 5fdf1824aed4ce53742e9d37dd39d3e0c5e8c33a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 8 Sep 2002 18:17:31 +0000 Subject: Reopen stdin to /dev/null instead of closing it to avoid perl 5.8 warnings --- pingd | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pingd b/pingd index 265b42c..6fc327c 100755 --- a/pingd +++ b/pingd @@ -3,7 +3,7 @@ $| = 1; # (c) 2002 Peter Palfrader -# $Id: pingd,v 1.72 2002/09/05 15:12:42 weasel Exp $ +# $Id: pingd,v 1.73 2002/09/08 18:17:31 weasel Exp $ # =pod @@ -287,7 +287,7 @@ use POSIX qw(setsid); delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; -my $VERSION = '2.0rc1'; +my $VERSION = '2.0rc2'; my $redirected_stdio = 0; @@ -630,11 +630,9 @@ if ($COMMAND eq 'add' || $COMMAND eq 'delete') { exit(0) if (fork()); POSIX::setsid(); exit(0) if (fork()); - close STDOUT; - close STDERR; open (STDOUT, ">>output") or die ("Cannot open 'output' as STDOUT\n"); open (STDERR, ">&STDOUT") or die ("Cannot dup STDOUT as STDERR\n"); - close STDIN; + open (STDIN , "{'process'} ); -- cgit v1.2.3