|
Posted by Andy Jeffries on 04/24/06 17:50
I've got a script which calls (via exec) "php myscript.php --params=here".
Within myscript.php I try to become a daemon (to continue asynchronously
from the calling script) using pcntl_fork, posix_setsid and pcntl_fork
again.
It works if I call the myscript.php from the command line (it correctly
damonises and returns immediately, carrying on processing in the
background), but when I do it through Apache (request the calling
script) it waits for the child to complete first.
Anything obvious I'm doing wrong?
I'll happily post snippets of the script here, but I'd imagine it's
something fundamental I'm missing.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|