mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +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(SIGTERM, SignalHandler);
|
||||
|
||||
#ifdef __linux__
|
||||
#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_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);
|
||||
#endif
|
||||
}
|
||||
|
@ -616,6 +616,15 @@ void RegTestHost::HookSignals()
|
||||
{
|
||||
std::signal(SIGINT, 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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user