From 8577ed812b60b5cfa6c656b7aa4c4b6cd30590bc Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Wed, 21 Jun 2000 10:44:15 +0000 Subject: [PATCH] fcron don't fork any more in debug mode to check up the death of the child : it prevent system from doing a core dump --- fcron.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/fcron.c b/fcron.c index 13d8ca4..cb643b8 100644 --- a/fcron.c +++ b/fcron.c @@ -21,11 +21,11 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.18 2000-06-21 09:48:56 thib Exp $ */ + /* $Id: fcron.c,v 1.19 2000-06-21 10:44:15 thib Exp $ */ #include "fcron.h" -char rcs_info[] = "$Id: fcron.c,v 1.18 2000-06-21 09:48:56 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.19 2000-06-21 10:44:15 thib Exp $"; void main_loop(void); void info(void); @@ -382,35 +382,6 @@ main(int argc, char **argv) close(1); dup2(i, 1); close(2); dup2(i, 2); - if(debug_opt) { - /* wait until child death and log his return value - * on error */ - int status; - - switch ( pid = fork() ) { - case -1: - die_e("fork"); - break; - case 0: - /* child */ - daemon_pid = getpid(); - break; - default: - /* parent */ - while ( wait4(pid, &status, 0, NULL) != pid ) ; - if ( ! WIFEXITED(status) ) - error("fcron[%d] has exited with status %d", - pid, WEXITSTATUS(status)); - if ( WIFSIGNALED(status) ) - error("fcron[%d] has exited due to signal %d", - pid, WTERMSIG(status)); - - exit(0); - - } - } - - } /* if we are in foreground, check if another fcron daemon -- 2.47.3