diff options
| author | Aaron Lehmann <aaronl@vitelius.com> | 2001-12-31 06:12:48 +0000 |
|---|---|---|
| committer | Aaron Lehmann <aaronl@vitelius.com> | 2001-12-31 06:12:48 +0000 |
| commit | 1a6986699f45c670584b5d63c4e2799bc9bb02ad (patch) | |
| tree | d9085cc798d4ac2c0e06a5bff1f51d8fd9427c22 /shell | |
| parent | eec2bbb9bf026da532244c83a5c9671e20c62c3c (diff) | |
| download | busybox-w32-1a6986699f45c670584b5d63c4e2799bc9bb02ad.tar.gz busybox-w32-1a6986699f45c670584b5d63c4e2799bc9bb02ad.tar.bz2 busybox-w32-1a6986699f45c670584b5d63c4e2799bc9bb02ad.zip | |
ash patch: forkshell-diff
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/shell/ash.c b/shell/ash.c index 24f1c34a3..db52e5e92 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -6695,17 +6695,9 @@ forkshell(struct job *jp, const union node *n, int mode) | |||
| 6695 | setsignal(SIGTSTP); | 6695 | setsignal(SIGTSTP); |
| 6696 | setsignal(SIGTTOU); | 6696 | setsignal(SIGTTOU); |
| 6697 | } else if (mode == FORK_BG) { | 6697 | } else if (mode == FORK_BG) { |
| 6698 | ignoresig(SIGINT); | ||
| 6699 | ignoresig(SIGQUIT); | ||
| 6700 | if ((jp == NULL || jp->nprocs == 0) && | ||
| 6701 | ! fd0_redirected_p ()) { | ||
| 6702 | close(0); | ||
| 6703 | if (open(devnull, O_RDONLY) != 0) | ||
| 6704 | error(nullerr, devnull); | ||
| 6705 | } | ||
| 6706 | } | ||
| 6707 | #else | 6698 | #else |
| 6708 | if (mode == FORK_BG) { | 6699 | if (mode == FORK_BG) { |
| 6700 | #endif | ||
| 6709 | ignoresig(SIGINT); | 6701 | ignoresig(SIGINT); |
| 6710 | ignoresig(SIGQUIT); | 6702 | ignoresig(SIGQUIT); |
| 6711 | if ((jp == NULL || jp->nprocs == 0) && | 6703 | if ((jp == NULL || jp->nprocs == 0) && |
| @@ -6715,7 +6707,6 @@ forkshell(struct job *jp, const union node *n, int mode) | |||
| 6715 | error(nullerr, devnull); | 6707 | error(nullerr, devnull); |
| 6716 | } | 6708 | } |
| 6717 | } | 6709 | } |
| 6718 | #endif | ||
| 6719 | for (i = njobs, p = jobtab ; --i >= 0 ; p++) | 6710 | for (i = njobs, p = jobtab ; --i >= 0 ; p++) |
| 6720 | if (p->used) | 6711 | if (p->used) |
| 6721 | freejob(p); | 6712 | freejob(p); |
| @@ -12479,7 +12470,7 @@ findvar(struct var **vpp, const char *name) | |||
| 12479 | /* | 12470 | /* |
| 12480 | * Copyright (c) 1999 Herbert Xu <herbert@debian.org> | 12471 | * Copyright (c) 1999 Herbert Xu <herbert@debian.org> |
| 12481 | * This file contains code for the times builtin. | 12472 | * This file contains code for the times builtin. |
| 12482 | * $Id: ash.c,v 1.42 2001/12/31 06:07:57 aaronl Exp $ | 12473 | * $Id: ash.c,v 1.43 2001/12/31 06:12:48 aaronl Exp $ |
| 12483 | */ | 12474 | */ |
| 12484 | static int timescmd (int argc, char **argv) | 12475 | static int timescmd (int argc, char **argv) |
| 12485 | { | 12476 | { |
