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

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