X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlipc.pod;h=6ab14def007cc4becf86dbcd71c05f11a7dc0fbf;hb=70a63dff8306516881e1d108737939903cfadaef;hp=c75fa958d09dca8687f63365e731d7c36540bc14;hpb=ca585e4dbaf85f4268cfbda9a6899be6dec77130;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlipc.pod b/pod/perlipc.pod index c75fa95..6ab14de 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -191,33 +191,33 @@ located in the subroutine C, 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"; @@ -1638,10 +1638,11 @@ version and suggestions from the Perl Porters. There's a lot more to networking than this, but this should get you started. -For intrepid programmers, the indispensable textbook is I by W. Richard Stevens (published by Addison-Wesley). Note -that most books on networking address networking from the perspective of -a C programmer; translation to Perl is left as an exercise for the reader. +For intrepid programmers, the indispensable textbook is I by W. Richard Stevens +(published by Prentice-Hall). Note that most books on networking +address the subject from the perspective of a C programmer; translation +to Perl is left as an exercise for the reader. The IO::Socket(3) manpage describes the object library, and the Socket(3) manpage describes the low-level interface to sockets. Besides the obvious