Re: [PHP-DEV] Fork() in php?
Hi, When cvs comes back up checkout the new experimental module pcntl. This is experimental so don't go using this for production just yet. Thanks, -Jason - Original Message - From: Daniel Fuehrer [EMAIL PROTECTED] To: Jason Greene [EMAIL PROTECTED] Sent: Monday, June 18, 2001 5:53 PM Subject: Re: [PHP-DEV] Fork() in php? Hi! could you please send me those fork test functions ? I've written a simple NNTP-Server and the only thing missing is a fork-function. Many thanks in advance. Daniel Fuehrer -- every.de - Your Community / Web: http://www.every.de/ / Mail: [EMAIL PROTECTED] - Original Message - From: Jason Greene [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 11, 2001 5:10 PM Subject: [PHP-DEV] Fork() in php? What do you guys think about having fork, waitpid, and signal handling available in php? I wrote a few simple fork test functions, and everything seemed to work fine. I am thinking that with sockets, shm, signals, and fork capability, there could be the possibility of someone writing daemons in php : ) Can anyone think of possible problems that could occur in supporting this functionality? If it were to be added, where should it be added? IMO this type of thing probably shouldn't exist in ext/standard. Thanks, -Jason -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
[Manuel Lemos [EMAIL PROTECTED]] Hello Zeev, On 12-May-01 14:14:10, you wrote: At 04:05 12/5/2001, Wez Furlong wrote: I know that there might be some bad interactions with apache if you fork, but if you allow PHP to spot that it forked and call _exit() instead of returning into the SAPI, you should be OK? Not really, the parent has to somehow call wait() on the child, otherwise you'd get zombie processes... Generally, implementing that sort of stuff within the Apache framework is a bit of asking for trouble :I Anyway, PHP really lacks of real multi-threading capabilities. Things like database connection pooling, (non-HTTP) server request handling, and GUI event processing could be properly implemented in PHP with multi-threading capabilities like the way it is done in Java, Perl, Python, etc. but can't be done right in PHP because it lacks multi-threading support. Any plans to add multi-threading capabilities to PHP? There are no plans for adding MT to PHP itself, but you do have a poor man's cooperative multi-threading through ticks. So now we have a poor man's objects and a poor man's multitasking. What does that say about us? :-) - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
At 16:00 21/5/2001, Stig Sæther Bakken wrote: There are no plans for adding MT to PHP itself, but you do have a poor man's cooperative multi-threading through ticks. So now we have a poor man's objects and a poor man's multitasking. What does that say about us? :-) That we have a filthy rich man's Web platform? :) Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
I was thinking about MT in php, but the platform differences would be a nightmare. We could abstract it like perl does, though even their implementation has problems. I would like to start with process control features (fork(), signals, waitpid() etc), but I am not sure where everything should go. Should there be a /ext/process? Should signals be in a separate extension? Let me know what you guys think. -Jason - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Stig Sæther Bakken [EMAIL PROTECTED] Cc: Manuel Lemos [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, May 21, 2001 4:33 AM Subject: Re: [PHP-DEV] Fork() in php? At 16:00 21/5/2001, Stig Sæther Bakken wrote: There are no plans for adding MT to PHP itself, but you do have a poor man's cooperative multi-threading through ticks. So now we have a poor man's objects and a poor man's multitasking. What does that say about us? :-) That we have a filthy rich man's Web platform? :) Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
[Jason Greene [EMAIL PROTECTED]] I was thinking about MT in php, but the platform differences would be a nightmare. We could abstract it like perl does, though even their implementation has problems. I would like to start with process control features (fork(), signals, waitpid() etc), but I am not sure where everything should go. Should there be a /ext/process? Should signals be in a separate extension? Let me know what you guys think. -Jason IMHO this type of functionality should only be available in a dedicated SAPI module, at least now. There are a lot of worms waiting to come out of this can, so put the can in a bucket first. :-) - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
At 01:30 22/5/2001, Stig Sæther Bakken wrote: IMHO this type of functionality should only be available in a dedicated SAPI module, at least now. There are a lot of worms waiting to come out of this can, so put the can in a bucket first. :-) Very nicely put! :) Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Fork() in php?
There are no plans for adding MT to PHP itself, but you do have a poor man's cooperative multi-threading through ticks. Are these documented anywhere? Thanks. -- Richard Heyes 'Live your life as if you're going to die tomorrow. Learn as if you're going to live forever.' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
[Richard Heyes [EMAIL PROTECTED]] There are no plans for adding MT to PHP itself, but you do have a poor man's cooperative multi-threading through ticks. Are these documented anywhere? Uhm, it seems not. Me fix. - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
At 04:05 12/5/2001, Wez Furlong wrote: I know that there might be some bad interactions with apache if you fork, but if you allow PHP to spot that it forked and call _exit() instead of returning into the SAPI, you should be OK? Not really, the parent has to somehow call wait() on the child, otherwise you'd get zombie processes... Generally, implementing that sort of stuff within the Apache framework is a bit of asking for trouble :I Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Fork() in php?
On 2001-05-11 16:10:00, Jason Greene [EMAIL PROTECTED] wrote: What do you guys think about having fork, waitpid, and signal handling available in php? I wrote a few simple fork test functions, and everything seemed to work fine. I am thinking that with sockets, shm, signals, and fork capability, there could be the possibility of someone writing daemons in php : ) I would like to use this functionality to fork an apache request so that the parent can serve up some content while the child carries on with some number-crunching or other time consuming task. I know that there might be some bad interactions with apache if you fork, but if you allow PHP to spot that it forked and call _exit() instead of returning into the SAPI, you should be OK? --Wez. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]