[PATCH 2.5] idled: Add missing signals_poll() call

Thomas Jarosch thomas.jarosch at intra2net.com
Fri Sep 25 04:42:08 EDT 2015


This fixes broken shutdown on platforms without pselect().

A side effect of the "#ifdef HAVE_PSELECT" code path in signals_select()
is that it calls signals_poll_mask() on each run. So it will
pick up previously delivered signals.
---
 imap/idled.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/imap/idled.c b/imap/idled.c
index b35c7c2..8850ce1 100644
--- a/imap/idled.c
+++ b/imap/idled.c
@@ -343,6 +343,8 @@ int main(int argc, char **argv)
     for (;;) {
 	int n;
 
+	signals_poll();
+
 	/* check for shutdown file */
 	if (shutdown_file(NULL, 0)) {
 	    /* signal all processes to shutdown */
-- 
1.9.3



More information about the Cyrus-devel mailing list