Skip to content

Commit

Permalink
Merge pull request #1493 from inomotech-foss/master
Browse files Browse the repository at this point in the history
Handle CTRL+BREAK signals hackrf-tools on Windows
  • Loading branch information
mossmann authored Dec 5, 2024
2 parents 83a7e6c + c0181b4 commit a7da235
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 a7da235

Please sign in to comment.