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

Re^2: Unix-Domain TCP Server Crashing

by wokka (Acolyte)
on Aug 17, 2010 at 19:22 UTC ( #855576=note: print w/ replies, xml ) Need Help??


in reply to Re: Unix-Domain TCP Server Crashing
in thread Unix-Domain TCP Server Crashing

Thank you for your informed response. This will help me in future debugging as well. By changing the for loop to:

while(1) { accept(Client,Server) || next; logmsg "connection on $NAME"; spawn sub { print "Hello there, it's now ", scalar localtime, "\n"; exec '/usr/games/fortune' or die "can't exec fortune: $!"; }; close Client; }
The problem no longer appears. Now all it needs are hup and err handlers and it's on its way to being a proper daemon. Thank you so much. Now to figure out how to get bi-directional passing with storable...


Comment on Re^2: Unix-Domain TCP Server Crashing
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2015-07-07 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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









    Results (86 votes), past polls