Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/phmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,15 @@ extern uint64_t gpls_nbr;
#ifdef HAVE_SIGACTION
static struct sigaction action;
static void sighup_hdlr(int sig);
#ifdef HAVE_NCURSES
extern int end_ncurses(void);
#endif

static void sighup_hdlr(int sig)
{
#ifdef HAVE_NCURSES
end_ncurses();
#endif
if(sig == SIGINT)
log_critical("SIGINT detected! PhotoRec has been killed.\n");
else if(sig == SIGHUP)
Expand Down
3 changes: 3 additions & 0 deletions src/testdisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ static struct sigaction action;

static void sighup_hdlr(int sig)
{
#ifdef HAVE_NCURSES
end_ncurses();
#endif
if(sig == SIGINT)
log_critical("SIGINT detected! PhotoRec has been killed.\n");
else if(sig == SIGHUP)
Expand Down