There are a couple of things I'm trying to do and I can't find anything in the documentation that indicates if its possible or not. This is all using the CLI version.
First, I would like to close all file descriptors, including stdin, stdout, and stderr. But I can't find any way of doing so. This is for backgrounding a process. Barring that, redirecting them to /dev/null would be sufficient. This is the only piece I haven't worked out yet. I know I could just use "nohup" and all that jazz to start the process up, but I wanted to make the thing into a "grown up" daemon. The other thing I wanted to do was to avoid the whole daemonization thing and run the process from inetd. However, I need to have the remote IP address of the connection. A likely candidate for doing so would seem to be socket_getpeername() but I can't do that on a regular file resource like I would get from opening php://stdin, for example. I also see no way of doing any socket operation on the stdin/stdout file descriptors at all which would be immensely useful for this sort of application. I can work around this with a short C wrapper that executes the script after doing to socket operations but I'd rather not do this. -- William Astle finger [EMAIL PROTECTED] for further information Geek Code V3.12: GCS/M/S d- s+:+ !a C++ UL++++$ P++ L+++ !E W++ !N w--- !O !M PS PE V-- Y+ PGP t+@ 5++ X !R tv+@ b+++@ !DI D? G e++ h+ y? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php