diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-03-02 22:05:21 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-03-02 22:05:21 +0000 |
commit | 31f6b3fb07ec0d5816c2dabbc314009c3126b58b (patch) | |
tree | 42e83d51173372b3b7924128442b585dc5766b6f /Src/exec.c | |
parent | b4273451f367d23b1d0d173b4f8687670a8fe1d6 (diff) | |
download | zsh-31f6b3fb07ec0d5816c2dabbc314009c3126b58b.tar.gz zsh-31f6b3fb07ec0d5816c2dabbc314009c3126b58b.tar.xz zsh-31f6b3fb07ec0d5816c2dabbc314009c3126b58b.zip |
22317: exit status from code backgrounded in function
22277, 22281, tweaks: standardize behaviour of wait builtin with trapped signals
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c index 58fc476bc..6c68c5c7d 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3037,7 +3037,7 @@ getoutput(char *cmd, int qt) zclose(pipes[1]); retval = readoutput(pipes[0], qt); fdtable[pipes[0]] = FDT_UNUSED; - waitforpid(pid); /* unblocks */ + waitforpid(pid, 0); /* unblocks */ lastval = cmdoutval; return retval; } @@ -3190,7 +3190,7 @@ getoutputfile(char *cmd) close(fd); os = jobtab[thisjob].stat; - waitforpid(pid); + waitforpid(pid, 0); cmdoutval = 0; jobtab[thisjob].stat = os; return nam; @@ -3852,7 +3852,7 @@ doshfunc(char *name, Eprog prog, LinkList doshargs, int flags, int noreturnval) popheap(); if (exit_pending) { - if (locallevel) { + if (locallevel > forklevel) { /* Still functions to return: force them to do so. */ retflag = 1; breaks = loops; |