mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-08 17:31:29 -06:00
use lambda for signal handler
This commit is contained in:
parent
a52fe81add
commit
e25c3bcee6
@ -339,11 +339,6 @@ void VulkanRenderer::GetDeviceFeatures()
|
||||
#if BOOST_OS_LINUX
|
||||
#include <sys/wait.h>
|
||||
|
||||
static void WorkaroundChildAbortHandler(int unused)
|
||||
{
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
static void LinuxBreathOfTheWildWorkaround(VkInstance& instance, const VkInstanceCreateInfo* create_info)
|
||||
{
|
||||
|
||||
@ -394,7 +389,7 @@ static void LinuxBreathOfTheWildWorkaround(VkInstance& instance, const VkInstanc
|
||||
int childID = fork();
|
||||
if (childID == 0) // inside this if statement runs in child
|
||||
{
|
||||
struct sigaction sa{.sa_handler = WorkaroundChildAbortHandler};
|
||||
struct sigaction sa{.sa_handler = [](int unused){_exit(1);}};
|
||||
sigaction(SIGABRT, &sa, nullptr);
|
||||
|
||||
freopen("/dev/null", "w", stderr);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user