e4b22c21d8
- Add zsh-findproc.patch: fix findproc() to find stopped jobs OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=71
21 lines
698 B
Diff
21 lines
698 B
Diff
commit 21c39600ef2d74c3e7474c4e5b89805656c6fe4e
|
|
Author: Bart Schaefer <barts@users.sourceforge.net>
|
|
Date: Sun Jun 12 15:06:37 2011 +0000
|
|
|
|
29472: findproc() needs at least to also return stopped jobs.
|
|
|
|
diff --git a/Src/jobs.c b/Src/jobs.c
|
|
index b3ec000..0ace80b 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;
|