Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
############### First it worked well lasting for 3 or 4 minutes.But suddenly it was out of control.I think "select($rbits,undef,undef,undef);" statement lose his effect and he didn't like to wait for the filehandle become ready any more.The child print innumerable "$connect=0; $readpipe="READ$connect"; $writepipe="WRITE$connect"; pipe($readpipe,$writepipe); $writepipe->autoflush(); my $pid; if (!($pid=fork)) { close $writepipe; $readpipe->autoflush; select(NEW_SOCKET); while(1) { my $words; my $rbits=''; vec($rbits,fileno($readpipe),1)=1; select($rbits,undef,undef,undef); $words=<$readpipe>; print "<br>$words"; } close NEW_SOCKET; exit; } $connect++; close $readpipe; $writepipe->autoflush(); $pipes{$pid}=$writepipe;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can you tell me why?
by chromatic (Archbishop) on Feb 23, 2000 at 21:27 UTC |