diff options
author | Frank Terbeck <ft@bewatermyfriend.org> | 2011-12-01 10:02:04 +0100 |
---|---|---|
committer | Frank Terbeck <ft@bewatermyfriend.org> | 2011-12-01 10:02:04 +0100 |
commit | d8da5ea2f2bc5f837d0b364fff2636ebdb2f90ca (patch) | |
tree | 9fd9a57486ac4702608d92088ffd91f52971244f /Src/signals.c | |
parent | af2bb4fdb09414d21922d3fafe4e3a0ac1332f01 (diff) | |
parent | 9d71f4c207fb34e8d64af0443c83231b1cc3b494 (diff) | |
download | zsh-d8da5ea2f2bc5f837d0b364fff2636ebdb2f90ca.tar.gz zsh-d8da5ea2f2bc5f837d0b364fff2636ebdb2f90ca.zip |
Merge commit 'zsh-4.3.13' into debian
Diffstat (limited to 'Src/signals.c')
-rw-r--r-- | Src/signals.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Src/signals.c b/Src/signals.c index 456a85300..ad688094b 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -489,16 +489,24 @@ wait_for_processes(void) * Find the process and job containing this pid and * update it. */ - pn = NULL; if (findproc(pid, &jn, &pn, 0)) { + if (((jn->stat & STAT_BUILTIN) || + (list_pipe && + (thisjob == -1 || + (jobtab[thisjob].stat & STAT_BUILTIN)))) && + WIFSTOPPED(status) && WSTOPSIG(status) == SIGTSTP) { + killjb(jn, SIGCONT); + zwarn("job can't be suspended"); + } else { #if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE) - struct timezone dummy_tz; - gettimeofday(&pn->endtime, &dummy_tz); - pn->status = status; - pn->ti = ru; + struct timezone dummy_tz; + gettimeofday(&pn->endtime, &dummy_tz); + pn->status = status; + pn->ti = ru; #else - update_process(pn, status); + update_process(pn, status); #endif + } update_job(jn); } else if (findproc(pid, &jn, &pn, 1)) { pn->status = status; @@ -1185,7 +1193,7 @@ dotrapargs(int sig, int *sigtr, void *sigfn) traplocallevel = locallevel; runhookdef(BEFORETRAPHOOK, NULL); if (*sigtr & ZSIG_FUNC) { - int osc = sfcontext; + int osc = sfcontext, old_incompfunc = incompfunc; HashNode hn = gettrapnode(sig, 0); args = znewlinklist(); @@ -1211,8 +1219,10 @@ dotrapargs(int sig, int *sigtr, void *sigfn) trapisfunc = isfunc = 1; sfcontext = SFC_SIGNAL; + incompfunc = 0; doshfunc((Shfunc)sigfn, args, 1); sfcontext = osc; + incompfunc= old_incompfunc; freelinklist(args, (FreeFunc) NULL); zsfree(name); } else { |