fork + thread = zombie ?
From: Thomas BOUTON (tbouton_at_streamwide.com)
Date: 02/25/04
- Next message: Lew Pitcher: "Re: fork + thread = zombie ?"
- Previous message: Sebastiano: "Re: Can't set up soname"
- Next in thread: Lew Pitcher: "Re: fork + thread = zombie ?"
- Reply: Lew Pitcher: "Re: fork + thread = zombie ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Feb 2004 18:26:56 +0100
Hello all,
I am working on a multiprocess / multithreaded app supposed to run on
RedHat Linux Enterprise 3 WS.
Unfortunately, I stumble upon a bad problem: the following sequence
(simplified) generates a lot of zombie processes.
for(;;) {
accept();
if(fork()) {
pthread_attr_setdetachstate(&pattr,PTHREAD_CREATE_DETACHED);
pthread_create();
// Do useful stuffs
exit(0);
}
}
I tried a set of signal handlers between SIG_IGN and SIG_DFL for both
parent and child processes, but I always end up with zombies, in some
cases, I even get 'undead' ones (i.e. zombies with init as a parent).
Is there anything I should do and forgot ?
thanks in advance,
Thomas BOUTON
- Next message: Lew Pitcher: "Re: fork + thread = zombie ?"
- Previous message: Sebastiano: "Re: Can't set up soname"
- Next in thread: Lew Pitcher: "Re: fork + thread = zombie ?"
- Reply: Lew Pitcher: "Re: fork + thread = zombie ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|