Re: killing child process
| From: | Marek Kilimajer | Date: | Thu, 02 Jan 2003 15:51:30 +0000 |
| Subject: | Re: killing child process | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129952@lists.php.net to get a copy of this message | ||
Michael J. Pawlowsky wrote:
Actually to kill all of them would not be hard.... Try something like ps -eaf | grep httpd | awk '{print $2}' actualy it will be named only other_script.php (it doesn't go through httpd).You can execute the scripts with a dummy parameter that will be a random string and grep for that in the above command.
That will give you all the httpd processes... pipe that into killMike *********** REPLY SEPARATOR *********** On 02/01/2003 at 8:26 PM gamin wrote:Hello, Running PHP 4.0.6 on RedHat 7.2. I'm writing a command line script (called scirpt.php) and am using the backtick operator to start other processes from my script. $com_response =./other_script.php; or #com_response =wget ....; I can kill scirpt.php easily but that wont kill other_script.php, there would be no problem killing one process manually, but i could have many scirpts starting from the main script. Killing them all would be a task. I could prefix their name them with 'ch_' and kill all these. But thats not the solution i'm looking for. Is there a way to make a process a child, so that when the parent termintaes/is terminated the child terminates also ? thx gamin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php