You could just avoid killing processes
Linux
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
But where is the fun then? ;p On a more serous note, yes I agree. In most cases (probably all cases) there should be no need to get rid of zombie processes.
@thingsiplay Stop their parent process and the zombie will go under init, then init will stop them.
To be clear, merely stopping the parent (SIGSTOP) will not do the job. You have to kill or otherwise end it.
That's what the video explains as well. Killing the parents will make init adopt and kill the children in the process. Problem is, that you might not want to stop / kill the parent process, depending on what you are doing. One should be very careful of doing so.
@thingsiplay Yes, you are right. I think you could trace the parent, by a gdb, and then execute a wait() in its name.
@thingsiplay Sorry you might right! In this case, I would debug the parent process and I would execute the wait() syscalls in its name, but it is hardly autimatizable and probably many people can not do that. Thanks the info!
All they wanna do is eat your brains. They're not unreasonable; I mean no one's gonna eat your eyes.
All they wanna do is eat your brains. We're at an impasse here. Maybe we should compromise.
Just open up the door. We'll all come inside, and eat your braaains!
If you open up the door, we'll all come inside and eat your brains!
