I have a script startbg.php:
echo `/usr/bin/php $dir/runbg.php >> $dir/logbg.txt 2>&1 &`;
Which I call from the web (via HTTP/Apache).
It runs runbg.php in a background process.
But if I restart Apache (/etc/init.d/apache2 restart), the background process is killed.
Is there anyway I can keep the process running in the background?