]> andersk Git - moira.git/commitdiff
fixup SIGCHLD before and after call to system()
authormar <mar>
Thu, 31 Aug 1989 18:57:51 +0000 (18:57 +0000)
committermar <mar>
Thu, 31 Aug 1989 18:57:51 +0000 (18:57 +0000)
dcm/dcm.c

index 1863a204ec1d0527fb752e946b68184223c5b4e8..1d03604ad10c6529612dbb5c91997543f930293d 100644 (file)
--- a/dcm/dcm.c
+++ b/dcm/dcm.c
@@ -19,6 +19,7 @@ static char rcsid_dcm_c[] = "$Header$";
 #include <sys/file.h>
 #include <sys/time.h>
 #include <sys/wait.h>
+#include <signal.h>
 #include <ctype.h>
 #include <sms.h>
 #include <sms_app.h>
@@ -154,7 +155,7 @@ do_services()
     struct save_queue *sq, *sq_create();
     char *service, dfgen_prog[64], dfgen_cmd[128];
     struct service svc;
-    int status, lock_fd, ex;
+    int status, lock_fd, ex, (*cstat)();
     struct timezone tz;
     register char *p;
     union wait waits;
@@ -215,7 +216,9 @@ do_services()
                }
            
                com_err(whoami, status, " running %s", dfgen_prog);
+               cstat = signal(SIGCHLD, SIG_DFL);
                waits.w_status = system(dfgen_cmd);
+               signal(SIGCHLD, cstat);
                if (waits.w_termsig) {
                    status = SMS_TAR_FAIL;
                    com_err(whoami, status, " %s exited on signal %d",
This page took 0.040612 seconds and 5 git commands to generate.