[PATCH] ntdll: Add SIGQUIT to server block set.

Paul Gofman pgofman at codeweavers.com
Thu Sep 10 18:41:04 CDT 2020


Receiving SIGQUIT for forced thread termination may leave sync
objects (like virtual_mutex) locked.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49532
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
    While the issue I observed in the referenced bug (happening during the process termination only)
    can be solved in different ways, I suppose protecting the locks from SIGQUIT is preferred
    because the thread can also be aborted the same way with NtTerminateThread apart from the
    whole process tear down.

 dlls/ntdll/unix/server.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
index cadbbe70a25..ac250c5d9d8 100644
--- a/dlls/ntdll/unix/server.c
+++ b/dlls/ntdll/unix/server.c
@@ -1432,6 +1432,7 @@ void server_init_process(void)
     sigaddset( &server_block_set, SIGUSR1 );
     sigaddset( &server_block_set, SIGUSR2 );
     sigaddset( &server_block_set, SIGCHLD );
+    sigaddset( &server_block_set, SIGQUIT );
     pthread_sigmask( SIG_BLOCK, &server_block_set, NULL );
 
     /* receive the first thread request fd on the main socket */
-- 
2.26.2




More information about the wine-devel mailing list