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

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