fix Red Hat BZ#1479320 by making interactive shells remember async PIDs too
This commit is contained in:
parent
1fa38c9c2c
commit
6327ca02f2
12
jobs.c
12
jobs.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.123 2017/08/08 14:29:23 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.124 2017/08/08 14:30:10 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
#define mksh_killpg killpg
|
#define mksh_killpg killpg
|
||||||
@ -1022,8 +1022,14 @@ j_notify(void)
|
|||||||
}
|
}
|
||||||
for (j = job_list; j; j = tmp) {
|
for (j = job_list; j; j = tmp) {
|
||||||
tmp = j->next;
|
tmp = j->next;
|
||||||
if (j->flags & JF_REMOVE)
|
if (j->flags & JF_REMOVE) {
|
||||||
remove_job(j, "notify");
|
if (j == async_job || (j->flags & JF_KNOWN)) {
|
||||||
|
j->flags = (j->flags & ~JF_REMOVE) | JF_ZOMBIE;
|
||||||
|
j->job = -1;
|
||||||
|
nzombie++;
|
||||||
|
} else
|
||||||
|
remove_job(j, "notify");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
shf_flush(shl_out);
|
shf_flush(shl_out);
|
||||||
#ifndef MKSH_NOPROSPECTOFWORK
|
#ifndef MKSH_NOPROSPECTOFWORK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user