From 2a5f8ad226ae798d0d28c5b2259e348255d435fa Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 31 Oct 2009 18:42:42 +0100 Subject: Multi::Core: Fixed bug in daemonizing code Apparently closing STDOUT/STDIN/STDERR will exit the process... so open /dev/null instead. (As done in the perlipc manual - of course doesn't work on windows, but nobody cares about that) --- lib/Multi/Core.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Multi/Core.pm b/lib/Multi/Core.pm index 076edf51..06ade2f1 100644 --- a/lib/Multi/Core.pm +++ b/lib/Multi/Core.pm @@ -79,9 +79,9 @@ sub _start { chdir '/'; umask 0022; $SIG{__WARN__} = sub {(local$_=shift)=~s/\r?\n//;$poe_kernel->call(core=>log=>'__WARN__: '.$_)}; - close STDOUT; - close STDERR; - close STDIN; + open STDIN, '/dev/null'; + open STDOUT, '>/dev/null'; + open STDERR, '>/dev/null'; } -- cgit v1.2.3