|Perl Monk, Perl Meditation|
How Can I Reliably Cleanup Sockets in a Backgrounded Program?by xarex (Initiate)
|on Jul 02, 2007 at 12:45 UTC||Need Help??|
xarex has asked for the
wisdom of the Perl Monks concerning the following question:
i have the following......
Basically all it does is listen for conections on a certain port number, and then writes the data recieved to a log file,
the above code works 100% for what i need,
My problem is if i start the script using Putty SSH like so ./file.pl
then its all fine, it creates the connections and if the connection is terninated it cleans up the dead children from the server, and releases the port again,
however, if i start the script like so
then it doesnt cleen up the dead children and keeps the port also in use after the host has disconnected
I need this file to be running all the time, could someone please tell me the correct way of doing this, or is there a problem in my script somewhere?
Please guys i really need to try and get this fixed