]> granicus.if.org Git - fcron/commitdiff
fcron don't fork any more in debug mode to check up the death of the child :
authorthib <thib>
Wed, 21 Jun 2000 10:44:15 +0000 (10:44 +0000)
committerthib <thib>
Wed, 21 Jun 2000 10:44:15 +0000 (10:44 +0000)
it prevent system from doing a core dump

fcron.c

diff --git a/fcron.c b/fcron.c
index 13d8ca41298b75d128fda9bae8555f59ae4633fe..cb643b8f627263840fe9af7eafa995dea9625149 100644 (file)
--- a/fcron.c
+++ b/fcron.c
  *  `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