summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-04-29 20:37:09 -0700
committerBart Schaefer <schaefer@zsh.org>2022-04-29 20:37:09 -0700
commit8181708feb35c647aa9b9692875a1ebf893ade6b (patch)
tree2b5667f4c91269f48c5d6ba1090e351584929645
parent15bf8ace168a86d0fae90b10e9f706baddd4c0bf (diff)
downloadzsh-8181708feb35c647aa9b9692875a1ebf893ade6b.tar.gz
zsh-8181708feb35c647aa9b9692875a1ebf893ade6b.tar.xz
zsh-8181708feb35c647aa9b9692875a1ebf893ade6b.zip
50136: Fix =(nosuchcommand) race/deadlock first reported in workers/42609
-rw-r--r--ChangeLog3
-rw-r--r--Etc/BUGS2
-rw-r--r--Src/exec.c4
3 files changed, 3 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 7cf99072e..e234b76b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2022-04-29  Bart Schaefer  <schaefer@zsh.org>
 
+	* 50136: Etc/BUGS, Src/exec.c: Fix =(nosuchcommand) race/deadlock
+	first reported in workers/42609
+
 	* 50134: Src/jobs.c: Tweak process group handling (workers/43409)
 	to avoid creating "unkillable" pipelines that ignore signals
 
diff --git a/Etc/BUGS b/Etc/BUGS
index a0d23eac9..befae4477 100644
--- a/Etc/BUGS
+++ b/Etc/BUGS
@@ -30,8 +30,6 @@ the prefix parameter assignments are examined in execute().
 41203 and others: Make it easier to maintain C modules out of tree.
 (May require defining a stable API for modules, see 41254)
 ------------------------------------------------------------------------
-42609: :|: =(hang)
-------------------------------------------------------------------------
 44133 debian #924736 (partial patch in 44134) three setopts following `    #`
 ------------------------------------------------------------------------
 44850 terminal issues with continuation markers
diff --git a/Src/exec.c b/Src/exec.c
index c31089bb5..f2911807c 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4883,13 +4883,9 @@ getoutputfile(char *cmd, char **eptr)
 	child_unblock();
 	return nam;
     } else if (pid) {
-	int os;
-
 	close(fd);
-	os = jobtab[thisjob].stat;
 	waitforpid(pid, 0);
 	cmdoutval = 0;
-	jobtab[thisjob].stat = os;
 	return nam;
     }