]> code.citadel.org Git - citadel.git/blobdiff - citadel/sendcommand.c
Removed the global variable 'home_specified'
[citadel.git] / citadel / sendcommand.c
index 0127536ab5b1f9e341d74fdde5156eb7992f31f3..45ff15c5daa99c089879bbe54f4aa31dae4da871 100644 (file)
@@ -73,6 +73,8 @@ void remove_lockfile(void)
  */
 void nq_cleanup(int e)
 {
+       if (e == SIGALRM)
+               fprintf(stderr, "\nWatch dog time out.\n");
        remove_lockfile();
        exit(e);
 }
@@ -161,12 +163,6 @@ void sendcommand_die(void) {
 }
 
 
-void check_exit_code(int code, void *arg)
-{
-       if (code == SIGALRM)
-               fprintf(stderr, "\nWatch dog time out.\n");
-}
-
 
 /*
  * main
@@ -187,8 +183,6 @@ int main(int argc, char **argv)
        int ret, err;
        int server_shutting_down = 0;
        
-       on_exit (check_exit_code, NULL);
-
        strcpy(ctdl_home_directory, DEFAULT_PORT);
 
        strcpy(cmd, "");
@@ -203,7 +197,6 @@ int main(int argc, char **argv)
                        else
                                safestrncpy(relhome, &argv[a][2],
                                                        sizeof relhome);
-                       home_specified = 1;
                        home=1;
                } else if (!strncmp(argv[a], "-w", 2)) {
                        watchdog = atoi(&argv[a][2]);