Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Fix users/26150 from Etc/BUGS



This fixes multios when used with nullexec.

The fix for
 :|: =(nosuchcommand)
is probably going to be similar.
diff --git a/Etc/BUGS b/Etc/BUGS
index 3121fc9fa..b511ec6d6 100644
--- a/Etc/BUGS
+++ b/Etc/BUGS
@@ -46,12 +46,6 @@ interactive and the subshell is the foreground job.  The USEZLE option is
 always turned off in subshells, for reasons lost to history.  There is a
 related, probably obsolete, vared special case for $TERM set to "emacs".
 ------------------------------------------------------------------------
-users/26150: MULTIOS does not work with "exec":
-
-exec 3>/tmp/test1 3>/tmp/test2
-
-causes a script to hang.
-------------------------------------------------------------------------
 47561: [PATCH v4] vcs_info: choose backend by basedir
 ------------------------------------------------------------------------
 39319: () { exit } =(:) doesn't clean up the tempfile
diff --git a/Src/exec.c b/Src/exec.c
index 47753da48..c31089bb5 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3898,6 +3898,10 @@ execcmd_exec(Estate state, Execcmd_params eparams,
 	    for (i = 0; i < 10; i++)
 		if (save[i] != -2)
 		    zclose(save[i]);
+	    /*
+	     * We're done with this job, no need to wait for it.
+	     */
+	    jobtab[thisjob].stat |= STAT_DONE;
 	    goto done;
 	}
 	if (isset(XTRACE)) {


Messages sorted by: Reverse Date, Date, Thread, Author