Angelo
12-02-2006, 06:01 AM
Hello,
This may seem different from a php approach however i am trying to write a server in PHP. I have written a very simple socket server, which reads input from keyboard and writes the same to you back.
My server is working fine with child processes. However if anyone quits the server, that child process becomes defunct. I added signal handling but i seem unable to receive any signals on the server. posix_kill , or direct kill -9 through command line does not work for the childs too.
If anyone here knows signal handling on unix, i would like to share the piece of code i wrote, and you can help me before there is no hair left on my head.
http://pastey.net/2899
This may seem different from a php approach however i am trying to write a server in PHP. I have written a very simple socket server, which reads input from keyboard and writes the same to you back.
My server is working fine with child processes. However if anyone quits the server, that child process becomes defunct. I added signal handling but i seem unable to receive any signals on the server. posix_kill , or direct kill -9 through command line does not work for the childs too.
If anyone here knows signal handling on unix, i would like to share the piece of code i wrote, and you can help me before there is no hair left on my head.
http://pastey.net/2899
