X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FDaemonize%2FCore.pm;h=3eb72521fddf734b145de1b20623368c59607bab;hb=b37fcc5f9a086f8204bea2490775aaea6d3859e3;hp=c6305a315144fd48eeb3fc1a7f5d8d71f8c632ea;hpb=62b880dad663f9cdd9912615b4529fde6e198f30;p=gitmo%2FMooseX-Daemonize.git diff --git a/lib/MooseX/Daemonize/Core.pm b/lib/MooseX/Daemonize/Core.pm index c6305a3..3eb7252 100644 --- a/lib/MooseX/Daemonize/Core.pm +++ b/lib/MooseX/Daemonize/Core.pm @@ -3,8 +3,6 @@ use strict; # cause Perl::Critic errors are annoying use MooseX::Getopt; # to load the NoGetopt metaclass use Moose::Role; -our $VERSION = '0.15'; - use POSIX (); has is_daemon => ( @@ -41,7 +39,7 @@ has dont_close_all_files => ( sub _get_options { my ($self, %options) = @_; - # backwards compability.. old code might be calling daemon_fork/_detach with options + # backwards compatibility.. old code might be calling daemon_fork/_detach with options foreach my $opt (qw( ignore_zombies no_double_fork dont_close_all_files )) { $self->$opt( $options{ $opt } ) if ( defined $options{ $opt } ); } @@ -85,7 +83,7 @@ sub daemon_detach { umask 0; # clear the file creation mask unless ( $self->dont_close_all_files ) { - # get the max numnber of possible file descriptors + # get the max number of possible file descriptors my $openmax = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ); $openmax = 64 if !defined($openmax) || $openmax < 0; @@ -190,7 +188,7 @@ daemon process or not. Setting this attribute to true will cause this method to not perform the typical double-fork, which is extra added protection from your process -accidentally aquiring a controlling terminal. More information can be +accidentally acquiring a controlling terminal. More information can be found above, and by Googling "double fork daemonize". If you the double-fork behavior off, you might want to enable the @@ -223,7 +221,7 @@ the built in fork, it returns the child pid to the parent process, 0 to the child process. It will also set the is_daemon flag appropriately. -The C<%options> argument remains for backwards compatability, but +The C<%options> argument remains for backwards compatibility, but it is suggested that you use the attributes listed above instead. =item B @@ -231,7 +229,7 @@ it is suggested that you use the attributes listed above instead. This detaches the new child process from the terminal by doing the following things. -The C<%options> argument remains for backwards compatability, but +The C<%options> argument remains for backwards compatibility, but it is suggested that you use the attributes listed above instead. =over 4 @@ -273,7 +271,7 @@ false), this method will simply return and do nothing. This will simply call C followed by C. -The C<%options> argument remains for backwards compatability, but +The C<%options> argument remains for backwards compatibility, but it is suggested that you use the attributes listed above instead. =item meta() @@ -282,6 +280,8 @@ The C method from L =back +=back + =head1 STUFF YOU SHOULD READ =over 4