mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-08 04:25:37 +00:00
Qt: Ensure SIGCHLD is ignored properly
This commit is contained in:
parent
5fea81c07d
commit
d812463649
@ -2634,11 +2634,12 @@ void QtHost::HookSignals()
|
|||||||
std::signal(SIGINT, SignalHandler);
|
std::signal(SIGINT, SignalHandler);
|
||||||
std::signal(SIGTERM, SignalHandler);
|
std::signal(SIGTERM, SignalHandler);
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifndef _WIN32
|
||||||
// Ignore SIGCHLD by default on Linux, since we kick off aplay asynchronously.
|
// Ignore SIGCHLD by default on Linux, since we kick off aplay asynchronously.
|
||||||
struct sigaction sa_chld = {};
|
struct sigaction sa_chld = {};
|
||||||
sigemptyset(&sa_chld.sa_mask);
|
sigemptyset(&sa_chld.sa_mask);
|
||||||
sa_chld.sa_flags = SA_SIGINFO | SA_RESTART | SA_NOCLDSTOP | SA_NOCLDWAIT;
|
sa_chld.sa_handler = SIG_IGN;
|
||||||
|
sa_chld.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_NOCLDWAIT;
|
||||||
sigaction(SIGCHLD, &sa_chld, nullptr);
|
sigaction(SIGCHLD, &sa_chld, nullptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -616,6 +616,15 @@ void RegTestHost::HookSignals()
|
|||||||
{
|
{
|
||||||
std::signal(SIGINT, SignalHandler);
|
std::signal(SIGINT, SignalHandler);
|
||||||
std::signal(SIGTERM, SignalHandler);
|
std::signal(SIGTERM, SignalHandler);
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
// Ignore SIGCHLD by default on Linux, since we kick off aplay asynchronously.
|
||||||
|
struct sigaction sa_chld = {};
|
||||||
|
sigemptyset(&sa_chld.sa_mask);
|
||||||
|
sa_chld.sa_handler = SIG_IGN;
|
||||||
|
sa_chld.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_NOCLDWAIT;
|
||||||
|
sigaction(SIGCHLD, &sa_chld, nullptr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegTestHost::GPUThreadEntryPoint()
|
void RegTestHost::GPUThreadEntryPoint()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user