From 5fee8028cdec913ec794264ac826556a34d3e7bf Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 3 Jan 2025 08:34:44 -0800 Subject: [PATCH] LinuxSyscalls: Ensure CSIGNAL is merged back in to flags for clone2 This fixes #4247 --- Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp index eded499f71..2a452a317d 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp @@ -526,7 +526,7 @@ static uint64_t Clone2Handler(FEXCore::Core::CpuStateFrame* Frame, FEX::HLE::clo // Remove flags that will break us constexpr uint64_t INVALID_FOR_HOST = CLONE_SETTLS; - uint64_t Flags = args->args.flags & ~INVALID_FOR_HOST; + uint64_t Flags = (args->args.flags & ~INVALID_FOR_HOST) | args->args.exit_signal; uint64_t Result = ::clone(Clone2HandlerRet, // To be called function (void*)((uint64_t)args->NewStack + args->StackSize), // Stack Flags, // Flags