how to clear zombie process

how to clear zombie process

Post by Yu Sze Ko » Fri, 29 Nov 1996 04:00:00



Hi,

I want to know how to kill zombie process (defunct) in unix.

I am using
App Architecture is      sun4
Kernel Architecture is   sun4m
OS Name is               SunOS
OS Version is            4.1.4
Kernel Version is        SunOS Release 4.1.4 (CS_MCAST)
                         #1: Sat Jul 29 03:53:22

I know I can call wait(). however,wait will suspends the parent process
that's what I don't wnat.

I just want the child process could exit and don't become a zombie while
the parent process will not suspend to wait the child process.
And I have tried the following method taught in Unix Networking Programming
by Stevens and it seems not working properly in my system.

#include <signal.h>
signal(SIGCLD, SIG_IGN);

#include <sys/wait.h>
waitpid(-1, NULL, WNOHANG | WUNTRACED);

regards,

clive

 
 
 

how to clear zombie process

Post by Vincent Giacomin » Fri, 29 Nov 1996 04:00:00



> Hi,

> I want to know how to kill zombie process (defunct) in unix.

> regards,

> clive

Use function *waitpid* with arg option=WNOHANG.
In this way, process can clear zombie process without blocking

Hope this helps...

--
Vincent GIACOMINI
STERIA SUD OUEST
271, avenue de Grande Bretagne
Immeuble "Le Phnicia", BP3111
31026 TOULOUSE Cedex


 
 
 

1. how to clear zombie process

Hi,

I want to know how to kill zombie process (defunct) in unix.

I am using
App Architecture is      sun4
Kernel Architecture is   sun4m
OS Name is               SunOS
OS Version is            4.1.4
Kernel Version is        SunOS Release 4.1.4 (CS_MCAST)
                         #1: Sat Jul 29 03:53:22

I know I can call wait(). however,wait will suspends the parent process
that's what I don't wnat.

I just want the child process could exit and don't become a zombie while
the parent process will not suspend to wait the child process.
And I have tried the following method taught in Unix Networking Programming
by Stevens and it seems not working properly in my system.

#include <signal.h>
signal(SIGCLD, SIG_IGN);

#include <sys/wait.h>
waitpid(-1, NULL, WNOHANG | WUNTRACED);

regards,

clive

2. ACCOUNTING Software

3. sound card for pcmcia laptop

4. clear command - Clear does not clear my screen.

5. tn5250 emulator

6. Zombie processes "owned" by apache processes ...

7. go32gcc problem

8. zombies nothing than zombies on a SUN

9. Zombie processes

10. /usr/bin/{reset,clear) - clear does not work even after reset

11. KDE creating a zombie process

12. NIS creates zombie processes