diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c index 46f00dd3d..02cd6b77c 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -4379,6 +4379,7 @@ clear_traps(void) | |||
4379 | 4379 | ||
4380 | /* Lives far away from here, needed for forkchild */ | 4380 | /* Lives far away from here, needed for forkchild */ |
4381 | static void closescript(void); | 4381 | static void closescript(void); |
4382 | |||
4382 | /* Called after fork(), in child */ | 4383 | /* Called after fork(), in child */ |
4383 | static void | 4384 | static void |
4384 | forkchild(struct job *jp, union node *n, int mode) | 4385 | forkchild(struct job *jp, union node *n, int mode) |
@@ -4423,15 +4424,8 @@ forkchild(struct job *jp, union node *n, int mode) | |||
4423 | setsignal(SIGQUIT); | 4424 | setsignal(SIGQUIT); |
4424 | setsignal(SIGTERM); | 4425 | setsignal(SIGTERM); |
4425 | } | 4426 | } |
4426 | #if JOBS | ||
4427 | /* For "jobs | cat" to work like in bash, we must retain list of jobs | ||
4428 | * in child, but we do need to remove ourself */ | ||
4429 | if (jp) | ||
4430 | freejob(jp); | ||
4431 | #else | ||
4432 | for (jp = curjob; jp; jp = jp->prev_job) | 4427 | for (jp = curjob; jp; jp = jp->prev_job) |
4433 | freejob(jp); | 4428 | freejob(jp); |
4434 | #endif | ||
4435 | jobless = 0; | 4429 | jobless = 0; |
4436 | } | 4430 | } |
4437 | 4431 | ||