patch-1.3.11 linux/kernel/exit.c
Next file: linux/kernel/fork.c
Previous file: linux/kernel/dma.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Mon Jul 17 12:10:39 1995
- Orig file:
v1.3.10/linux/kernel/exit.c
- Orig date:
Fri Jun 30 16:22:30 1995
diff -u --recursive --new-file v1.3.10/linux/kernel/exit.c linux/kernel/exit.c
@@ -27,18 +27,18 @@
struct sigaction * sa = sig + p->sigaction - 1;
/* always generate signals for traced processes ??? */
- if (p->flags & PF_PTRACED) {
- p->signal |= mask;
- return 1;
+ if (!(p->flags & PF_PTRACED)) {
+ /* don't bother with ignored signals (but SIGCHLD is special) */
+ if (sa->sa_handler == SIG_IGN && sig != SIGCHLD)
+ return 0;
+ /* some signals are ignored by default.. (but SIGCONT already did its deed) */
+ if ((sa->sa_handler == SIG_DFL) &&
+ (sig == SIGCONT || sig == SIGCHLD || sig == SIGWINCH))
+ return 0;
}
- /* don't bother with ignored signals (but SIGCHLD is special) */
- if (sa->sa_handler == SIG_IGN && sig != SIGCHLD)
- return 0;
- /* some signals are ignored by default.. (but SIGCONT already did its deed) */
- if ((sa->sa_handler == SIG_DFL) &&
- (sig == SIGCONT || sig == SIGCHLD || sig == SIGWINCH))
- return 0;
p->signal |= mask;
+ if (p->state == TASK_INTERRUPTIBLE && (p->signal & ~p->blocked))
+ wake_up_process(p);
return 1;
}
@@ -58,7 +58,7 @@
return 0;
if ((sig == SIGKILL) || (sig == SIGCONT)) {
if (p->state == TASK_STOPPED)
- p->state = TASK_RUNNING;
+ wake_up_process(p);
p->exit_code = 0;
p->signal &= ~( (1<<(SIGSTOP-1)) | (1<<(SIGTSTP-1)) |
(1<<(SIGTTIN-1)) | (1<<(SIGTTOU-1)) );
@@ -382,6 +382,7 @@
}
fake_volatile:
current->flags |= PF_EXITING;
+ del_timer(¤t->real_timer);
sem_exit();
exit_mmap(current);
free_page_tables(current);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this