Re: [PHP] pcntl_fork and reading from childs stdout
Hi Richard, Thanks for the response. I'll try out the fifo. Tom [EMAIL PROTECTED] wrote: On Sun, June 12, 2005 12:57 pm, Tom Fishwick said: I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... This might help: http://php.net/posix-mkfifo How you would tie stdout to your named pipe... Or perhaps you could http://php.net/exec something in each process to re-direct or tee stdin/stdout to your named pipes. Or... I dunno, really, just guessing. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pcntl_fork and reading from childs stdout
Hi All, I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... any ideas would be appreciated. (that don't involve using proc_open() :-) Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pcntl_fork and reading from childs stdout
On Sun, June 12, 2005 12:57 pm, Tom Fishwick said: I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... This might help: http://php.net/posix-mkfifo How you would tie stdout to your named pipe... Or perhaps you could http://php.net/exec something in each process to re-direct or tee stdin/stdout to your named pipes. Or... I dunno, really, just guessing. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pcntl_fork and reading from childs stdout
Tom Fishwick wrote: Hi All, I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... any ideas would be appreciated. (that don't involve using proc_open() :-) Tom http://www.php.net/popen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php