signal handling

From: Date: Sat, 02 Dec 2006 00:01:35 +0000
Subject: signal handling
Groups: php.general 
Request: Send a blank email to php-general+get-245440@lists.php.net to get a copy of this message
Hello Despite all of my results to succeed, i can not make this work. What i want to do is to write a simple socket server in PHP. My current example just prints the same character, you send to server from keyboard. It is successfull in forking, and generates child as people connect. However in any way the client exits, the child process remains defunct on system. I am trying to use signal handling, but some comments say through hanging sockets, it is not possible to handle signals. How can i stop this from happening, i am attaching the code i am working on, the 2 signals added at the bottom are just for test there, i tried all other signal types. Sending a posix_kill(posix_getpid(), SIGKILL) to the process when the client exits does not kill it too, it still is defunct. My code: http://pastey.net/2910 Thanks! Aras

« previous php.general (#245440) next »