[ELDK] kill an entire process group
Giuseppe Modugno
g.modugno at elettronika.it
Tue Aug 5 09:15:24 CEST 2008
On 4 Aug 2008 at 22:36, Wolfgang Denk wrote:
> > libc libraries are the same in my target and nfs development
> > systems. What could cause the different behaviour?
> The shell. The Busybox shell obviously does not create a process
> group at all.
Oh, I understand. I was thinking that the spawn of a process
automatically creates a process group (the parent process and the
child process). From your words I understand it's up to the shell to
create a process group when it spawns another process. Msh shell
doesn't create process groups.
> > Can someone suggest me a better method to kill parent and all the
> > child processes?
> If you don't want to create the process group and the
> processes yoruself, then you probably might ant to use a real shell
> (bash).
What do you mean with "create the process group and the processes
yourself"? Should I write a C program that creates a process and the
process group instead of using a script shell?
I think another way to do this is to search for the same parent ID in
the list of all processes. ps command has an option to select only
the
processes with a certain parent PID and I kill all these processes.
But in busybox ps doesn't recognize this option, so I need a full-
features ps that depends on libproc. But I think ps+libproc is better
(in size terms) than bash.
More information about the eldk
mailing list