Re: signal handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# manager@xxxxxxxxxx / 2006-12-02 02:01:35 +0200:
> 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

    The parent needs to wait(2) for its children. http://php.net/pcntl_wait

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux