On Mon, 2009-06-01 at 05:15 -0500, flint wrote:
> ----- Original Message ----- 
> From: "Robert Cummings" <rob...@interjinn.com>
> To: "flint" <fmill...@gmail.com>
> Cc: "PHP-General List" <php-general@lists.php.net>
> Sent: Sunday, May 31, 2009 10:15 PM
> Subject: Re: [PHP] spawning a process that uses pipes - doesn't 
> terminatewhen webpage download is canceled
> I'm already doing something like that... here's what I have basically
> $o = popen($cmd);
> while (!feof($o)) {
>   $buffer = fread($o,4096);
>   echo $p;
> }
> exit();
> Ok so I can add in the statements to stop auto aborting, use connection 
> aborted... but how do i kill the process chain itself? If I simply pclose 
> the process it has the same effect - the other spawned processes keep 
> running. I figured out what's happening is the lame process keeps going 
> utnil it finishes, and apparently is sending its data to the proverbial bit 
> bucket... and in a process tree it moves from being under the http process 
> to being under init itself...

You can use the linux shell command ps:

    exec( 'ps --ppid '.getmypid(), $children );

Application and Templating Framework for PHP

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to