I am being able to access a webserver via PHP. I wish to update some info within the Apache configs, and so i begin a spend script which makes the alterations. Then I wish to stop and restart Apache.
Problem: the moment I stop Apache, my process stops and my spend script, as being a child process, is wiped out. Apache never restarts. This happens with Apache restart.
It is possible to method to fork a completely independent, non-child process for that spend script, in order to restart Apache?
Thx, Mr B
You should use [cde]:
Without options, each jobspec is taken away in the table of active jobs. When the `-h' choice is given, the task isn't taken off the table, but is marked to ensure that SIGHUP isn't delivered to the task when the spend gets to be a SIGHUP. If jobspec isn't present, nor the `-a' nor `-r' choice is provided, the present job can be used. If no jobspec is provided, the `-a' option way to remove or mark all jobs the `-r' option with no jobspec argument limits operation to running jobs.
disown [-ar] [-h] [jobspec ...]
continues running even when the script that began it dies.
Have a look at nohup, may fit you needs.
let us if you have a script known as test.sh
should you run nohup ./test.sh &lifier you are able to get rid of the spend and also the process stay alive.