program exec killed after php restart (or stop)
Posted: Sun Dec 17, 2006 10:08 pm
I have been trying to write a script/interface for system updates for a linux distro called openfiler. This page is used to update the packages used by the disto such as samba, bind, tar, ... basically all the packages used in linux. The problem with the script is that if it trys to update its own package, the update process attempts to restart the service (the php service) and the process dies. In other words any thing I start with the script gets killed when the php service is stopped/restarted.
I need to start a command with exec() or the like and have it continue after the service openfiler (or php) is stopped.
Right now, just for a debugging test, I am trying to run exec("sleep 100 > /dev/null 2>&1 &"). The program runs fine, and the sleep command continues after the script like it should. The only problem is that if I stop the service openfiler, everything that was started on the php page stops immediately.
Is there any way to continue the execution after stopping the service/program?
Thanks,
Nathan Jones
I need to start a command with exec() or the like and have it continue after the service openfiler (or php) is stopped.
Right now, just for a debugging test, I am trying to run exec("sleep 100 > /dev/null 2>&1 &"). The program runs fine, and the sleep command continues after the script like it should. The only problem is that if I stop the service openfiler, everything that was started on the php page stops immediately.
Is there any way to continue the execution after stopping the service/program?
Thanks,
Nathan Jones