mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-07 15:19:56 +09:00
Fix getting stuck on shutdown with SIGINT
This commit is contained in:
@@ -15,6 +15,12 @@ namespace gsr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GlobalHotkeysLinux::~GlobalHotkeysLinux() {
|
GlobalHotkeysLinux::~GlobalHotkeysLinux() {
|
||||||
|
if(process_id > 0) {
|
||||||
|
kill(process_id, SIGKILL);
|
||||||
|
int status;
|
||||||
|
waitpid(process_id, &status, 0);
|
||||||
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 2; ++i) {
|
for(int i = 0; i < 2; ++i) {
|
||||||
if(pipes[i] > 0)
|
if(pipes[i] > 0)
|
||||||
close(pipes[i]);
|
close(pipes[i]);
|
||||||
@@ -22,12 +28,6 @@ namespace gsr {
|
|||||||
|
|
||||||
if(read_file)
|
if(read_file)
|
||||||
fclose(read_file);
|
fclose(read_file);
|
||||||
|
|
||||||
if(process_id > 0) {
|
|
||||||
kill(process_id, SIGKILL);
|
|
||||||
int status;
|
|
||||||
waitpid(process_id, &status, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GlobalHotkeysLinux::start() {
|
bool GlobalHotkeysLinux::start() {
|
||||||
|
|||||||
Reference in New Issue
Block a user