Re: Starting a background process and reporting failure if applicable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



janis.elmeris@xxxxx (Jānis Elmeris) wrote:

> I would like to start a PHP script in the background from within another
> PHP script. I would like to monitor all error cases properly.

"nohup" and "proc_open()" do not work as there is no way to properly
detach the launched process from the current process.  Instead,
see recipe to start a background process by Colin McKinnon at
http://symcbean.blogspot.it/2010/02/php-and-long-running-processes.html

My implementation based on this idea is the OfflineJob class, where
a background process can be lauched, an univocal ticket is returned,
and its current status can be retrieved; stdin can be set and stdout,
stderr can be retrieved:

http://www.icosaedro.it/phplint/phplint2/doc/stdlib/it/icosaedro/web/OfflineJob.html


Regards,
 ___ 
/_|_\  Umberto Salsi
\/_\/  www.icosaedro.it





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux