Why didn't I do it properly the first time 8-)
*/
void nq_cleanup(int e)
{
*/
void nq_cleanup(int e)
{
+ if (e == SIGALRM)
+ fprintf(stderr, "\nWatch dog time out.\n");
remove_lockfile();
exit(e);
}
remove_lockfile();
exit(e);
}
-void check_exit_code(int code, void *arg)
-{
- if (code == SIGALRM)
- fprintf(stderr, "\nWatch dog time out.\n");
-}
-
int ret, err;
int server_shutting_down = 0;
int ret, err;
int server_shutting_down = 0;
- on_exit (check_exit_code, NULL);
-
strcpy(ctdl_home_directory, DEFAULT_PORT);
strcpy(cmd, "");
strcpy(ctdl_home_directory, DEFAULT_PORT);
strcpy(cmd, "");