Re: Preventing zombies to occure

2000-08-25 Thread Ben Smithurst
> 'Alfred Perlstein' wrote: > >> int >> sigchld_handler(int) >> { >> >> while (waitpid(-1, NULL, 0) || errno == EINTR) >> ; >> } actually, shouldn't you use WNOHANG when calling waitpid() there? What I normally do is int e = errno; while (waitpid(-1, NULL,

Re: Preventing zombies to occure

2000-08-25 Thread 'Alfred Perlstein'
* Ben Smithurst <[EMAIL PROTECTED]> [000825 10:15] wrote: > 'Alfred Perlstein' wrote: > > > int > > sigchld_handler(int) > > { > > > > while (waitpid(-1, NULL, 0) || errno == EINTR) > > ; > > } > > Even more paranoid would be > > int > sigchld_handler(int) > { > int e =

Re: Preventing zombies to occure

2000-08-25 Thread Ben Smithurst
'Alfred Perlstein' wrote: > int > sigchld_handler(int) > { > > while (waitpid(-1, NULL, 0) || errno == EINTR) > ; > } Even more paranoid would be int sigchld_handler(int) { int e = errno; while (waitpid(-1, NULL, 0) || errno == EINTR) ;

Re: Preventing zombies to occure

2000-08-25 Thread Naief BinTalal
On Fri, Aug 25, 2000 at 02:19:28PM +, [EMAIL PROTECTED] wrote: > Hello, > Hi ix > By definition zombie is a process entry in proc table that wasn't released > by wait*() called form the parent's code. So all we need to do is to ensure A zombie can only occur with a *live* parent. If the

Re: Preventing zombies to occure

2000-08-25 Thread 'Alfred Perlstein'
* Yevmenkin, Maksim N, CSCIO <[EMAIL PROTECTED]> [000825 05:59] wrote: > > > > [snip] > > > > If a parent that has zombie children exits the kernel will attach them > > to init (I haven't checked, but this is the common unix solution). > > init will be calling waitpid to clear zombies automagi

RE: Preventing zombies to occure

2000-08-25 Thread Yevmenkin, Maksim N, CSCIO
> > I have some ideas to improve fork()-ing and getting rid of > zombie processes. > > This things mentioned here are proposed of a man that do > not know very well > > (author means 'the depths' of) BSD kernel source although > he have some ex- > > pirience with it (mainly in reading it :-). >

Re: Preventing zombies to occure

2000-08-25 Thread Alfred Perlstein
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [000825 03:14] wrote: > Hello, > > I have some ideas to improve fork()-ing and getting rid of zombie processes. > This things mentioned here are proposed of a man that do not know very well > (author means 'the depths' of) BSD kernel source although he have

Re: Preventing zombies to occure

2000-08-25 Thread John Baldwin
[EMAIL PROTECTED] wrote: > Hello, > > I have some ideas to improve fork()-ing and getting rid of zombie processes. > This things mentioned here are proposed of a man that do not know very well > (author means 'the depths' of) BSD kernel source although he have some ex- > pirience with it (mainly

Preventing zombies to occure

2000-08-25 Thread core-ix
Hello, I have some ideas to improve fork()-ing and getting rid of zombie processes. This things mentioned here are proposed of a man that do not know very well (author means 'the depths' of) BSD kernel source although he have some ex- pirience with it (mainly in reading it :-). By definition zom