Help for this page

Select Code to Download


  1. or download this
    # signal handler for child die events
    $SIG{TERM} = $SIG{INT} = \&do_term;
    ...
        }
    
    } continue { $connection->close; }
    
  2. or download this
    sub become_daemon {
      croak "Can't fork" unless defined (my $child = fork);
    ...
      delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
      $SIG{CHLD} = \&reap_child;
    }