diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-14 15:55:31 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-14 15:55:31 +0000 |
commit | 9fc3e9a8dbfd2bbce2fd825a104414994539cd4d (patch) | |
tree | 229ff25305667e5a68a524880d017ee516c91a1b /Src/exec.c | |
parent | c64a281a9b21bef8cc40abbf222e63d599ae4d5e (diff) | |
download | zsh-9fc3e9a8dbfd2bbce2fd825a104414994539cd4d.tar.gz zsh-9fc3e9a8dbfd2bbce2fd825a104414994539cd4d.tar.xz zsh-9fc3e9a8dbfd2bbce2fd825a104414994539cd4d.zip |
zsh-workers/9318
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c index af5a02f9c..0c87f4500 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1053,7 +1053,7 @@ execpline2(Pline pline, int how, int input, int output, int last1) lineno = pline->left->lineno; if (pline_level == 1) { - if (!sfcontext) + if ((how & Z_ASYNC) || (!sfcontext && !sourcelevel)) strcpy(list_pipe_text, getjobtext((void *) pline->left)); else list_pipe_text[0] = '\0'; @@ -1639,7 +1639,8 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) } /* Get the text associated with this command. */ - if (!sfcontext && (jobbing || (how & Z_TIMED))) + if ((how & Z_ASYNC) || + (!sfcontext && !sourcelevel && (jobbing || (how & Z_TIMED)))) text = getjobtext((void *) cmd); else text = NULL; @@ -2854,7 +2855,7 @@ execshfunc(Cmd cmd, Shfunc shf, LinkList args) { LinkList last_file_list = NULL; unsigned char *ocs; - int ocsp; + int ocsp, osfc; if (errflag) return; @@ -2882,7 +2883,10 @@ execshfunc(Cmd cmd, Shfunc shf, LinkList args) ocsp = cmdsp; cmdstack = (unsigned char *) zalloc(CMDSTACKSZ); cmdsp = 0; + if ((osfc = sfcontext) == SFC_NONE) + sfcontext = SFC_DIRECT; doshfunc(shf->nam, shf->funcdef, args, shf->flags, 0); + sfcontext = osfc; free(cmdstack); cmdstack = ocs; cmdsp = ocsp; |