dsniff/daemon_tmpl.c
void daemon_exit_handler(int sig)
{
    save_stat();
    deltree(root);
    fclose(logfile);
    
    unlink(daemon_info.pid_file);
    unlink(daemon_info.cmd_pipe);

    _exit(EXIT_FAILURE);
}
//perform actions on recieving sigterm or etc
perform actions on recieving sigterm or etc
perform actions on recieving sigterm or etc
void daemon_exit_handler(int sig)
{
    save_stat();
    deltree(root);
    fclose(logfile);
    unlink(daemon_info.pid_file);
    unlink(daemon_info.cmd_pipe);
    _exit(EXIT_FAILURE);
}
void daemon_exit_handler ( int sig ) { save_stat ( ) ; deltree ( root ) ; fclose ( logfile ) ; unlink ( daemon_info . pid_file ) ; unlink ( daemon_info . cmd_pipe ) ; _exit ( EXIT_FAILURE ) ; }
perform actions on recieving sigterm or etc
perform actions on recieving sigterm or etc