Blame SOURCES/zsh-5.0.2-sigchld-deadlock.patch

f686d7
From 656bc77fe9eb1c8c3eabcbcda131c3cd4dbb3acd Mon Sep 17 00:00:00 2001
f686d7
From: "Barton E. Schaefer" <schaefer@zsh.org>
f686d7
Date: Mon, 10 Aug 2015 12:54:05 -0700
f686d7
Subject: [PATCH] 36079: do not allow update_job() and its helpers to run the
f686d7
 signal queue while we are processing a job exit.
f686d7
f686d7
Upstream-commit: 93ca77f8f73bc58041bcbf8e4319b056504806e5
f686d7
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
f686d7
---
f686d7
 Src/signals.c | 8 ++++++++
f686d7
 1 file changed, 8 insertions(+)
f686d7
f686d7
diff --git a/Src/signals.c b/Src/signals.c
f686d7
index 6b8b773..c539063 100644
f686d7
--- a/Src/signals.c
f686d7
+++ b/Src/signals.c
f686d7
@@ -485,6 +485,12 @@ wait_for_processes(void)
f686d7
 	    break;
f686d7
 	}
f686d7
 
f686d7
+	/* This is necessary to be sure queueing_enabled > 0 when
f686d7
+	 * we enter printjob() from update_job(), so that we don't
f686d7
+	 * decrement to zero in should_report_time() and improperly
f686d7
+	 * run other handlers in the middle of processing this one */
f686d7
+	queue_signals();
f686d7
+
f686d7
 	/*
f686d7
 	 * Find the process and job containing this pid and
f686d7
 	 * update it.
f686d7
@@ -528,6 +534,8 @@ wait_for_processes(void)
f686d7
 	if (jn && !(jn->stat & (STAT_CURSH|STAT_BUILTIN)) &&
f686d7
 	    jn - jobtab != thisjob)
f686d7
 	    addbgstatus(pid, (int)lastval2);
f686d7
+
f686d7
+	unqueue_signals();
f686d7
     }
f686d7
 }
f686d7
 
f686d7
-- 
f686d7
2.5.0
f686d7