From: Stevan Little Date: Fri, 30 Nov 2007 02:58:04 +0000 (+0000) Subject: come basic changes; X-Git-Tag: 0_06~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba19d02eff2f81e44454655737bd1aacd9abe9fd;p=gitmo%2FMooseX-Daemonize.git come basic changes; --- diff --git a/lib/MooseX/Daemonize.pm b/lib/MooseX/Daemonize.pm index 94268b5..00f8131 100644 --- a/lib/MooseX/Daemonize.pm +++ b/lib/MooseX/Daemonize.pm @@ -12,7 +12,7 @@ use MooseX::Daemonize::PidFile; with qw[ MooseX::Daemonize::Core - MooseX::Daemonize::SignalHandling + MooseX::Daemonize::WithSignalHandling MooseX::Getopt ]; diff --git a/lib/MooseX/Daemonize/Core.pm b/lib/MooseX/Daemonize/Core.pm index 27e0dd6..4effbdc 100644 --- a/lib/MooseX/Daemonize/Core.pm +++ b/lib/MooseX/Daemonize/Core.pm @@ -15,9 +15,7 @@ has is_daemon => ( sub daemon_fork { fork } sub daemon_detach { # ignore these signals - for (qw(TSTP TTIN TTOU PIPE POLL STOP CONT CHLD)) { - $SIG{$_} = 'IGNORE' if (exists $SIG{$_}); - } + $SIG{'HUP'} = 'IGNORE'; POSIX::setsid; # set session id chdir '/'; # change to root directory diff --git a/lib/MooseX/Daemonize/SignalHandling.pm b/lib/MooseX/Daemonize/WithSignalHandling.pm similarity index 89% rename from lib/MooseX/Daemonize/SignalHandling.pm rename to lib/MooseX/Daemonize/WithSignalHandling.pm index 0b7cbfe..f1b58bf 100644 --- a/lib/MooseX/Daemonize/SignalHandling.pm +++ b/lib/MooseX/Daemonize/WithSignalHandling.pm @@ -1,4 +1,4 @@ -package MooseX::Daemonize::SignalHandling; +package MooseX::Daemonize::WithSignalHandling; use strict; # because Kwalitee is pedantic use Moose::Role;