$self->clear_exit_code;
# if the pid is not running
- # then we dont need to stop
+ # then we don't need to stop
# anything ...
if ($self->pidfile->is_running) {
=head1 DESCRIPTION
-Often you want to write a persistant daemon that has a pid file, and responds
+Often you want to write a persistent daemon that has a pid file, and responds
appropriately to Signals. This module provides a set of basic roles as an
infrastructure to do that.
=item I<no_double_fork Bool>
If true, the process will not perform the typical double-fork, which is extra
-added protection from your process accidentally aquiring a controlling terminal.
+added protection from your process accidentally acquiring a controlling terminal.
More information can be found by Googling "double fork daemonize".
=item I<ignore_zombies Bool>
=head2 Exit Code Methods
-These are overriable constant methods used for setting the exit code.
+These are overridable constant methods used for setting the exit code.
=over 4
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 } );
}
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;
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
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<daemon_detach (?%options)>
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
This will simply call C<daemon_fork> followed by C<daemon_detach>.
-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()