Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: Off-topic: Perl Question
Date: Jan 14 1998 4:49PM
> So, I've got couple questions:
> 1. In the code below extracted from the perlipc man page, can someone
> explain the relationship between the for loop, the reaper function and
> the $WAITEDPID variable? Why must $waitedpid be in the for loop's
I am not a TCP/IP specialist, but I would guess that the loop
could be written:
for ( $waitpid=0
($paddr = accept(Client,Server));
$waitedpid = 0, close Client)
my($port,$iaddr) = sockaddr_in($paddr);
ie skip the $waitpid condition in the for(), and forget about the
if($waitpid) in the body of the loop.
In my opinion this should work fine.
> 2. Why does the example code from 5.003 work in 5.003 but not in
> 5.004? Or why is the change made in the 5.004 example not necessary
> in 5.003?
I don't know, but it's may be related to signal handling changes.
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler