patch-2.1.57 linux/kernel/exit.c
Next file: linux/kernel/fork.c
Previous file: linux/ipc/msg.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Mon Sep 22 14:55:59 1997
- Orig file:
v2.1.56/linux/kernel/exit.c
- Orig date:
Tue Sep 23 16:48:50 1997
diff -u --recursive --new-file v2.1.56/linux/kernel/exit.c linux/kernel/exit.c
@@ -55,7 +55,7 @@
spin_lock(&p->sigmask_lock);
p->signal |= mask;
spin_unlock(&p->sigmask_lock);
- if (p->state == TASK_INTERRUPTIBLE && (p->signal & ~p->blocked))
+ if (p->state == TASK_INTERRUPTIBLE && signal_pending(p))
wake_up_process(p);
out:
spin_unlock_irqrestore(&p->sig->siglock, flags);
@@ -349,7 +349,8 @@
for_each_task(p) {
if (p->p_opptr == father) {
p->exit_signal = SIGCHLD;
- p->p_opptr = task[smp_num_cpus] ? : task[0]; /* init */
+ p->p_opptr = task[smp_num_cpus] ? : task[0]; /* init */
+ if (p->pdeath_signal) send_sig(p->pdeath_signal, p, 0);
}
}
read_unlock(&tasklist_lock);
@@ -659,7 +660,7 @@
if (options & WNOHANG)
goto end_wait4;
retval = -ERESTARTSYS;
- if (current->signal & ~current->blocked)
+ if (signal_pending(current))
goto end_wait4;
current->state=TASK_INTERRUPTIBLE;
schedule();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov