zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [PATCH] Fix users/26150 from Etc/BUGS
Date: Wed, 27 Apr 2022 22:24:43 -0700	[thread overview]
Message-ID: <CAH+w=7Zx022oxE+4RADqRAPR2=NKKcUAzrFkJseMEM06XzXyag@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 112 bytes --]

This fixes multios when used with nullexec.

The fix for
 :|: =(nosuchcommand)
is probably going to be similar.

[-- Attachment #2: u26150.txt --]
[-- Type: text/plain, Size: 1200 bytes --]

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)) {

             reply	other threads:[~2022-04-28  5:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  5:24 Bart Schaefer [this message]
2022-04-29  1:43 ` [PATCH] The thing about ":|: =(hang)" (Re: [PATCH] Fix users/26150 from Etc/BUGS) Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Zx022oxE+4RADqRAPR2=NKKcUAzrFkJseMEM06XzXyag@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).