Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Backgrounding (daemonizing?) a Net::server

by UnderMine (Friar)
on Mar 28, 2004 at 09:26 UTC ( [id://340366]=note: print w/replies, xml ) Need Help??


in reply to Backgrounding (daemonizing?) a Net::server

My suggestion for making the client pause until the server has started up would be to use file locking. If you are running on the same server which you appear to be all you need to do is have the server create a locking file on imediately on startup and unlock it when it is ready.

Another alternative if you are listening on a socket is to create the socket at the beginning of startup but not begin processing it until you are ready.

Daemon != Server because you can daemonise many things not just servers. The most usual place to find non server daemons is repeatative processes such as scheduling or long running processes like batch jobs. I often have batch processing that will run for upto 3 hours if these are not detached an error in the terminal could cause the process to error.

Just a few ideas.
UnderMine

  • Comment on Re: Backgrounding (daemonizing?) a Net::server

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found