about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/signals.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Src/signals.c b/Src/signals.c
index 78dc75b1b..f45c1860c 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -487,6 +487,12 @@ wait_for_processes(void)
 	    break;
 	}
 
+	/* This is necessary to be sure queueing_enabled > 0 when
+	 * we enter printjob() from update_job(), so that we don't
+	 * decrement to zero in should_report_time() and improperly
+	 * run other handlers in the middle of processing this one */
+	queue_signals();
+
 	/*
 	 * Find the process and job containing this pid and
 	 * update it.
@@ -536,6 +542,8 @@ wait_for_processes(void)
 		    WEXITSTATUS(status)));
 	    addbgstatus(pid, val);
 	}
+
+	unqueue_signals();
     }
 }