* init/job.c (job_child_reaper): Update argument names and types
to match new NihChildHandler pattern; switch on event instead,
which can now have three values not two (it always could, this was
a bug) to output warning and assume that status is always non-zero
if killed so no need to check that separately.
* init/job.h: Update prototype.
* init/tests/test_job.c (test_child_reaper): Update calls to
job_child_reaper to pass an NihChildEvents member instead of FALSE
or TRUE for killed.
* init/main.c: Adjust call to nih_child_add_watch to indicate which
events we want to pass to the reaper; we don't use NIH_CHILD_ALL
since we're going to add ptrace stuff to a different function.
diff --git a/init/main.c b/init/main.c
index ed43815..d086929 100644
--- a/init/main.c
+++ b/init/main.c
@@ -249,8 +249,11 @@
 	nih_signal_set_handler (SIGTERM, nih_signal_handler);
 	NIH_MUST (nih_signal_add_handler (NULL, SIGTERM, term_handler, NULL));
 
-	/* Reap children when they die */
-	NIH_MUST (nih_child_add_watch (NULL, -1, job_child_reaper, NULL));
+	/* Watch children for events */
+	NIH_MUST (nih_child_add_watch (NULL, -1,
+				       (NIH_CHILD_EXITED | NIH_CHILD_KILLED
+					| NIH_CHILD_DUMPED),
+				       job_child_reaper, NULL));
 
 	/* Process the event queue each time through the main loop */
 	NIH_MUST (nih_main_loop_add_func (NULL, (NihMainLoopCb)event_poll,