Re: [new PATCH] Re: 8139too: defunct threads

2001-04-16 Thread Andrew Morton
John Fremlin wrote: > > > > So it seems that we must reparent the thread to init, and > > make sure that it delivers SIGCHLD to init when it exits. > > Sounds good. Why isn't SIGCHLD a stronger default anyway. mm? The caller gets to choose... > [...] > > > + /* Set the exit signal to

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-16 Thread John Fremlin
Andrew Morton <[EMAIL PROTECTED]> writes: [...] > None of these will work. The problems with globally setting > exit_signal to SIGCHLD are that > > a) If the parent does waitpid(pid, status, __WCLONE), the >waitpid will fail. request_module() does this. I don't >know _why_ it does

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-16 Thread Andrew Morton
Manfred Spraul wrote: > > I found the problem: > > * init uses waitpid(-1,,), thus the __WALL flag is not set > * without __WALL, only processes with exit_signal == SIGCHLD are reaped > * it's impossible for user space processes to die with another > exit_signal, forget_original_parent changes

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-16 Thread Andrew Morton
Manfred Spraul wrote: I found the problem: * init uses waitpid(-1,,), thus the __WALL flag is not set * without __WALL, only processes with exit_signal == SIGCHLD are reaped * it's impossible for user space processes to die with another exit_signal, forget_original_parent changes the

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-16 Thread John Fremlin
Andrew Morton [EMAIL PROTECTED] writes: [...] None of these will work. The problems with globally setting exit_signal to SIGCHLD are that a) If the parent does waitpid(pid, status, __WCLONE), the waitpid will fail. request_module() does this. I don't know _why_ it does this.

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-16 Thread Andrew Morton
John Fremlin wrote: So it seems that we must reparent the thread to init, and make sure that it delivers SIGCHLD to init when it exits. Sounds good. Why isn't SIGCHLD a stronger default anyway. mm? The caller gets to choose... [...] + /* Set the exit signal to SIGCHLD so

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-15 Thread Rod Stewart
On Sun, 15 Apr 2001, Manfred Spraul wrote: > Alan, which fix would you prefer: > * init could use wait3 and set __WALL. > * all kernel thread users could set SIGCHLD. Some already do that > (__call_usermodehelper). > * the kernel_thread implementations could force the exit signal to > SIGCHLD.

[new PATCH] Re: 8139too: defunct threads

2001-04-15 Thread Manfred Spraul
I found the problem: * init uses waitpid(-1,,), thus the __WALL flag is not set * without __WALL, only processes with exit_signal == SIGCHLD are reaped * it's impossible for user space processes to die with another exit_signal, forget_original_parent changes the exit_signal back to SIGCHLD ("We

[new PATCH] Re: 8139too: defunct threads

2001-04-15 Thread Manfred Spraul
I found the problem: * init uses waitpid(-1,,), thus the __WALL flag is not set * without __WALL, only processes with exit_signal == SIGCHLD are reaped * it's impossible for user space processes to die with another exit_signal, forget_original_parent changes the exit_signal back to SIGCHLD ("We

Re: [new PATCH] Re: 8139too: defunct threads

2001-04-15 Thread Rod Stewart
On Sun, 15 Apr 2001, Manfred Spraul wrote: Alan, which fix would you prefer: * init could use wait3 and set __WALL. * all kernel thread users could set SIGCHLD. Some already do that (__call_usermodehelper). * the kernel_thread implementations could force the exit signal to SIGCHLD. I'd