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.
This commit is contained in:
Michael Ossmann
2022-09-18 05:07:09 -04:00
parent ca5049fcd3
commit 9181cbe049

View File

@ -397,7 +397,7 @@ void stop_main_loop(void)
#ifdef _WIN32 #ifdef _WIN32
SetEvent(interrupt_handle); SetEvent(interrupt_handle);
#else #else
kill(0, SIGALRM); kill(getpid(), SIGALRM);
#endif #endif
} }