summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Src/jobs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index b3ec0008c..0ace80b63 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -189,7 +189,8 @@ findproc(pid_t pid, Job *jptr, Process *pptr, int aux)
* the termination of the process which pid we were supposed
* to return in a different job.
*/
- if (pn->pid == pid && pn->status == SP_RUNNING) {
+ if (pn->pid == pid && (pn->status == SP_RUNNING ||
+ WIFSTOPPED(pn->status))) {
*pptr = pn;
*jptr = jobtab + i;
return 1;