Skip to content

Commit

Permalink
hackrf-tools: handle ctrl+break signal on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
scootermon authored Oct 18, 2024
1 parent 17f3943 commit c0181b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion host/hackrf-tools/src/hackrf_sweep.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static hackrf_device* device = NULL;
#ifdef _MSC_VER
BOOL WINAPI sighandler(int signum)
{
if (CTRL_C_EVENT == signum) {
if (CTRL_C_EVENT == signum || CTRL_BREAK_EVENT == signum) {
fprintf(stderr, "Caught signal %d\n", signum);
do_exit = true;
return TRUE;
Expand Down
2 changes: 1 addition & 1 deletion host/hackrf-tools/src/hackrf_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ static hackrf_device* device = NULL;
#ifdef _WIN32
BOOL WINAPI sighandler(int signum)
{
if (CTRL_C_EVENT == signum) {
if (CTRL_C_EVENT == signum || CTRL_BREAK_EVENT == signum) {
interrupted = true;
fprintf(stderr, "Caught signal %d\n", signum);
stop_main_loop();
Expand Down

0 comments on commit c0181b4

Please sign in to comment.