I guess the problem is in PHP. When PHP is waiting for a new socket connection, it can’t do anything else, even if signal handlers have been set up. So, for now, I’m just going to rely on INETD to handle that part. In otherwords, the process will not fork. Each time it is spawned, it will expect to handle one connection, perform it’s duties, and exit. This means I don’t need socket functions or process control since inetd will give me the data on stdin and send the data found on stdout. Additionally, since it’ll spawn a new process for every incoming connection, I don’t need process control.
If anyone can supply me with a piece of PHP code that can spawn a child process, and allow that child to exit while waiting on something else, please let me know. The only way I can think to force it to work, would be to set a timeout on the socket_accept routine. If after a second or two, the process has not found a new connection, it should loop. This would give it time to close child processes and then get back to looking for a connection to accept.