From: thib Date: Wed, 21 Jun 2000 10:44:15 +0000 (+0000) Subject: fcron don't fork any more in debug mode to check up the death of the child : X-Git-Tag: ver1564~597 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c12c4b90242b6eed83b48f0374cd5621bc8f0db;p=fcron 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 --- 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