From 9181cbe0493fea5cfc8d0feed89eaac4e42e1909 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Sun, 18 Sep 2022 05:07:09 -0400 Subject: [PATCH] hackrf_transfer: send signal to own PID Instead of sending a signal to the process group, get our own process ID and send the signal to it. This fixes a bug that prevented termination when called from a script. --- host/hackrf-tools/src/hackrf_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index 5d1adbc9..d7903f60 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -397,7 +397,7 @@ void stop_main_loop(void) #ifdef _WIN32 SetEvent(interrupt_handle); #else - kill(0, SIGALRM); + kill(getpid(), SIGALRM); #endif }