Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Forking HTTP Daemon

by Thelonius (Priest)
on Mar 19, 2003 at 18:29 UTC ( #244415=note: print w/ replies, xml ) Need Help??

in reply to Forking HTTP Daemon

The problem is that the SIGCHLD is interrupting the accept() call. To fix:

use Errno qw(EINTR); ... while (1) { $client = $socket->accept; if (!$client) { next if $! == EINTR; die "Error on accept: $!\n"; }
or equivalent

Updated per request:

This is also one of the examples given in Worse is Better

Comment on Re: Forking HTTP Daemon
Download Code
Re: Re: Forking HTTP Daemon
by Zola (Initiate) on Mar 19, 2003 at 20:48 UTC
    Much appreciated,
Re: Re: Forking HTTP Daemon
by Anonymous Monk on Apr 30, 2004 at 19:06 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://244415]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2015-07-03 07:10 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (48 votes), past polls