diff options
author | Yorhel <git@yorhel.nl> | 2009-10-31 18:42:42 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-11-02 22:16:24 +0100 |
commit | 2a5f8ad226ae798d0d28c5b2259e348255d435fa (patch) | |
tree | 544f32fa10abb259ee5e324c8de57c9aa7589239 /lib | |
parent | 4895ea63323b94f0b128d6874be997a24d3a3b0d (diff) |
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)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Multi/Core.pm | 6 |
1 files changed, 3 insertions, 3 deletions
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'; } |