I have a script on a server, and then more services on various clients. Everything works great in the process of what I am trying to accomplish, but when the socket is closed on one of the remote machines, The server side script exits with a "Broke n Pipe" error.
For now I just have a cron job to make sure the process is running every 2 minutes and starting it back up if it isn't, but I would like the process to always be running listening for connections on it's port.
While I was testing this, I did a clean shutdown of where the socket was closed on the client side and turned off; broken pipe.
Just killing the service on the client side resulted in a broken pipe error as well.
Can anyone give any insight on how to keep the process up and running, or more details on the broken pipe error? Been googling but not coming up with anything good.
<edit> I am seeing different messages saying the socket was not closed properly, but The client side (c# code) I have watched it go thru debug mode and close the socket. I will see if I can find anything about ignoring a broken pipe error. Like I saw $SIG{PIPE}= 'IGNORE'; if I want to ignore the error. I will look into just logging it, but keeping the process alive?