kill shell with its children

kill shell with its children

Post by Yurik Nazarof » Tue, 15 May 2001 00:32:44



Hello

I run a shell script that runs
    tail -f someFile | awk -f someAwkScript.awk

When I kill this script, the tail and awk processes continue to work...

How do I kill the shell script with all its children processes ?

--
Yuri Nazarov, tel. +7 (901) 762-9125

 
 
 

kill shell with its children

Post by Villy Kru » Tue, 15 May 2001 22:15:59



>Hello

>I run a shell script that runs
>    tail -f someFile | awk -f someAwkScript.awk

>When I kill this script, the tail and awk processes continue to work...

>How do I kill the shell script with all its children processes ?

If the shell and its children are all in their own exclusive processgroup
then kill by processgroup.  That is how shells kills a job.  When the
second argument to kill is negative then it is taken as a process
group id.

Villy

 
 
 

1. killing a shell script is not killing child processes

dispatcher (NOHUP mode)->daemon->shell script (parent
PID)->executables(child PIDs)

When we try to kill shell script (parent PID) with kill-9 command, I
am expecting that all executables (child PIDs) that are running from
shell script should also be killed.

Shell script process is getting killed but not the child processes.

I tried read all the messages patiently but it added up more
confusions.

I found a way to kill all child processes before killing parent shell
script but trying to find a answer for this behaviour.

Any expert responses are welcome.

Cheers,
Srinivas

2. samba and diald not playing nice

3. HELP! Writing a simple inetd-based server

4. killing a shell that has a running child shell

5. May Informix 4.1 working under Linux?

6. kill child and its all grad child processes?

7. Sparcstation 10 on a multisync monitor

8. how to kill a child process that runs other children processes

9. SEGV not killing child process of shell script

10. Bourne Shell script, that kills its child-processes?

11. Bourne Shell INTR kills children

12. Does killing parent kill children?