Add signal handlers for a proper cleanup

Fix locking problem in get_rtlsdr_sample when it waits indefinitely
even when exitflag is non-zero; cleanup the code.
This commit is contained in:
Volo Zyko
2023-06-30 14:12:48 +03:00
parent eacbd21c50
commit 0e9b2b245d
5 changed files with 39 additions and 12 deletions

View File

@@ -1732,8 +1732,6 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state)
}
if (choice == 20)
{
ncursesClose();
//cleanup_rtlsdr_stream();
cleanupAndExit (opts, state);
}
@@ -3414,7 +3412,6 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (c == 113) //'q' key, quit
{
ncursesClose();
cleanupAndExit (opts, state);
}