MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / sighup_hdlr

Function sighup_hdlr

src/testdisk.c:80–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78static struct sigaction action;
79
80static void sighup_hdlr(int sig)
81{
82 if(sig == SIGINT)
83 log_critical("SIGINT detected! PhotoRec has been killed.\n");
84 else if(sig == SIGHUP)
85 log_critical("SIGHUP detected! PhotoRec has been killed.\n");
86 else
87 log_critical("SIGTERM detected! PhotoRec has been killed.\n");
88 log_flush();
89 if(need_to_stop==1)
90 {
91 action.sa_handler=SIG_DFL;
92 sigaction(sig,&action,NULL);
93 kill(0, sig);
94 return ;
95 }
96 need_to_stop=1;
97}
98#endif
99
100static void display_help(void)

Callers

nothing calls this directly

Calls 2

log_flushFunction · 0.85
sigactionClass · 0.70

Tested by

no test coverage detected