diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/jobs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index af0a1233d..85d4c4d1f 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1476,7 +1476,10 @@ addproc(pid_t pid, char *text, int aux, struct timeval *bgtime, * set it for that, too. */ if (gleader != -1) { - jobtab[thisjob].gleader = gleader; + if (jobtab[thisjob].stat & STAT_CURSH) + jobtab[thisjob].gleader = gleader; + else + jobtab[thisjob].gleader = pid; if (list_pipe_job_used != -1) jobtab[list_pipe_job_used].gleader = gleader; /* |