Re: [PHP] Re: process creation

2009-01-25 Thread Tom Sinclair
Per Jessen wrote: Török Alpár wrote: as i said it's hate here, and i might be wrong but consider the following : for($icount=0;$icount11;$icount++) { $iPid = pcntl_fork(); $iChildrenCount = 0; if ($iPid == 0) { // child echo (child $icount\n); } else {

Re: [PHP] Re: process creation

2009-01-25 Thread Per Jessen
Tom Sinclair wrote: Per Jessen wrote: for($icount=0;$icount11;$icount++) Iterates 10 times?? Hmm 10, 11 - no big difference is there? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: process creation

2009-01-25 Thread Michael Kubler
Hmm, are people getting confused between and = ? for($icount=0;$icount11;$icount++) (is less than 11) for($icount=0;$icount=10;$icount++) (is less than or equal to 10) Both iterate 10 times. Michael Kubler *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz Per Jessen wrote: Tom

Re: [PHP] Re: process creation

2009-01-25 Thread Ashley Sheridan
On Mon, 2009-01-26 at 00:42 +1030, Michael Kubler wrote: Hmm, are people getting confused between and = ? for($icount=0;$icount11;$icount++) (is less than 11) for($icount=0;$icount=10;$icount++) (is less than or equal to 10) Both iterate 10 times. Michael Kubler *G*rey *P*hoenix

Re: [PHP] Re: process creation

2009-01-24 Thread Per Jessen
Török Alpár wrote: as i said it's hate here, and i might be wrong but consider the following : for($icount=0;$icount11;$icount++) { $iPid = pcntl_fork(); $iChildrenCount = 0; if ($iPid == 0) { // child echo (child $icount\n); } else { // parrent }

[PHP] Re: process creation

2009-01-23 Thread Tony Marston
I have achieved this by using curl_exec() to issue another HTTP request on the same server. By setting the timeout to a small number I regain control and can continue with other things while the new process runs to completion. Here is my code: $url = 'HTTP://' .$_SERVER['HTTP_HOST']

[PHP] Re: process creation

2009-01-23 Thread Nathan Rixham
bruce wrote: A simple question (or so I thought). Does php allow an app to create/start a process/application that can continue to run on its own, after the initiating program/app terminates? It appears that the spawning/forking functions might work, but the child apps would be in a zombie

Re: [PHP] Re: process creation

2009-01-23 Thread Török Alpár
2009/1/23 Nathan Rixham nrix...@gmail.com bruce wrote: A simple question (or so I thought). Does php allow an app to create/start a process/application that can continue to run on its own, after the initiating program/app terminates? It appears that the spawning/forking functions might

Re: [PHP] Re: process creation

2009-01-23 Thread Nathan Rixham
Török Alpár wrote: 2009/1/23 Nathan Rixham nrix...@gmail.com bruce wrote: A simple question (or so I thought). Does php allow an app to create/start a process/application that can continue to run on its own, after the initiating program/app terminates? It appears that the spawning/forking

Re: [PHP] Re: process creation

2009-01-23 Thread Török Alpár
as i said it's hate here, and i might be wrong but consider the following : for($icount=0;$icount11;$icount++) { $iPid = pcntl_fork(); $iChildrenCount = 0; if ($iPid == 0) { // child echo (child $icount\n); } else { // parrent } } this is essential what you do in

Re: [PHP] Re: process creation

2009-01-23 Thread Ashley Sheridan
On Sat, 2009-01-24 at 00:22 +0200, Török Alpár wrote: as i said it's hate here, and i might be wrong but consider the following : for($icount=0;$icount11;$icount++) { $iPid = pcntl_fork(); $iChildrenCount = 0; if ($iPid == 0) { // child echo (child $icount\n); }