killing a shell script is not killing child processes

killing a shell script is not killing child processes

Post by those who know me have no need of my nam » Wed, 20 Nov 2002 14:52:21



[fu-t set]

in comp.unix.internals i read:

Quote:>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.

a) kill -9 is evil.  do not use it except in *extreme* duress.

b) you have to signal the process group in order for the members to receive
the signal, otherwise you are only signaling one process.  the pgid is the
negative of the pid of the process group leader.

--
bringing you boring signatures for 17 years

 
 
 

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. LILO: any_d.b Win95

3. SEGV not killing child process of shell script

4. problems mounting a ext2 zip disk

5. How can kill all child processes without killing parent process ?

6. Syslog question

7. How to kill process which not killed by 'kill' ?

8. Theading and Multitasking for games development

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

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

11. Can a process kill its child if it's killed -9

12. A method to kill process that cannot be killed even with `kill -9'.

13. Terminating process/script with kill -9 or kill -15