diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-07-13 22:31:07 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-07-13 22:31:07 +0000 |
commit | d6fd60d6c3a0774fbfe740ce757e706eb822df8d (patch) | |
tree | 4b6bc32ffd5b20a87b43df26f39987b602537cb7 /pod/perlipc.pod | |
parent | d082746bc40ec66c0ca09ba780040e31980a9069 (diff) | |
download | perl-d6fd60d6c3a0774fbfe740ce757e706eb822df8d.tar.gz |
Small pod nits.
p4raw-id: //depot/perl@17525
Diffstat (limited to 'pod/perlipc.pod')
-rw-r--r-- | pod/perlipc.pod | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pod/perlipc.pod b/pod/perlipc.pod index c75fa958d0..02f2687419 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -191,33 +191,33 @@ located in the subroutine C<code()>, which simply prints some debug info to show that it works and should be replaced with the real code. #!/usr/bin/perl -w - + use POSIX (); use FindBin (); use File::Basename (); use File::Spec::Functions; - + $|=1; - + # make the daemon cross-platform, so exec always calls the script # itself with the right path, no matter how the script was invoked. my $script = File::Basename::basename($0); my $SELF = catfile $FindBin::Bin, $script; - + # POSIX unmasks the sigprocmask properly my $sigset = POSIX::SigSet->new(); my $action = POSIX::SigAction->new('sigHUP_handler', $sigset, &POSIX::SA_NODEFER); POSIX::sigaction(&POSIX::SIGHUP, $action); - + sub sigHUP_handler { print "got SIGHUP\n"; exec($SELF, @ARGV) or die "Couldn't restart: $!\n"; } - + code(); - + sub code { print "PID: $$\n"; print "ARGV: @ARGV\n"; |