in reply to TCP Server Exits Loop and Crashes with error

Ok, Good news. I removed the extra loop that Roboticus mentioned. After doing that and with the code to fork it in there, it runs now without throwing any errors. The only thing left to fix is now that I'm using child processes, they are not closing themselves. Any thoughts on how to make them close nicely? Thanks again Gurus!

  • Comment on Re: TCP Server Exits Loop and Crashes with error

Replies are listed 'Best First'.
Re^2: TCP Server Exits Loop and Crashes with error
by zentara (Cardinal) on Aug 03, 2010 at 19:23 UTC
    The only thing left to fix is now that I'm using child processes, they are not closing themselves. Any thoughts on how to make them close nicely?

    Use a method of forking that returns the pid, store them in an array, and do a kill 9 (or 15) on them when you want them gone? You may need to do a killfam on the pid just in case you get an extraneous shell pid as a parent to your spawned child pid.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku