--- kernel/exit.c.original Mon Aug 5 09:09:31 2002 +++ kernel/exit.c Mon Aug 5 09:53:22 2002 @@ -174,8 +174,22 @@ for_each_task(p) { if (p->p_opptr == father) { + struct task_struct *tg_member; /* We dont want people slaying init */ p->exit_signal = SIGCHLD; + /* Keep all members of the thread group with + p as real parent in the same exec id. + This prevents the generation of SIGCHLD + instead of the configured signal on exit + of slave threads of p + */ + for ( tg_member = next_thread(p); tg_member!=p; + tg_member = next_thread(tg_member)) { + if ( tg_member->p_opptr == p ) { + ++tg_member->self_exec_id; + ++tg_member->parent_exec_id; + } + } p->self_exec_id++; /* Make sure we're not reparenting to ourselves */