]> andersk Git - moira.git/blobdiff - server/startmoira.c
since the Oracle-based moirad never returns MR_DEADLOCK, we don't need
[moira.git] / server / startmoira.c
index 71323cf9582742704f46ad070744e326f42743c3..74cd79ba50b34e6b4d6c368e1f5421065b1e9762 100644 (file)
@@ -17,31 +17,30 @@ static char *rcsid_mr_starter_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
+#include <errno.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/file.h>
 #include <sys/wait.h>
 #include <sys/signal.h>
 #include <sys/ioctl.h>
-#include <moira_site.h>
-#include <sys/stat.h>
-#include <sys/resource.h>
+#include <time.h>
 #include <fcntl.h>
+#include <sys/resource.h>
+#include <moira_site.h>
 
 
 #define PROG   "moirad"
 
 int rdpipe[2];
+extern int errno;
 char *whoami;
 
-cleanup()
+void cleanup()
 {
-       int stat;
-
+       int stat, serrno = errno;
        char buf[BUFSIZ];
-       extern int errno;
-       int serrno = errno;
 
        buf[0]='\0';
        
@@ -80,9 +79,9 @@ main(argc, argv)
        
        struct sigaction action;
        int nfds;
-
+       
        whoami = argv[0];
-
+       
        getrlimit(RLIMIT_NOFILE, &rl);
        nfds = rl.rlim_cur;
 
@@ -138,13 +137,12 @@ main(argc, argv)
        
        do {
                char *time_s;
-               extern char *ctime();
                long foo;
                
                done = 0;
                errno = 0;
                if (fgets(buf, BUFSIZ, prog) == NULL) {
-                       if (errno) {
+                       if (errno && errno!=EINTR) {
                                strcpy(buf, "Unable to read from program: ");
                                strcat(buf, sys_errlist[errno]);
                                strcat(buf, "\n");
@@ -158,7 +156,3 @@ main(argc, argv)
        } while (!done);
        exit(0);
 }
-
-
-
-         
This page took 0.05389 seconds and 4 git commands to generate.