This prevents issues with gdbproxy, where gdb adds breakpoints to the dynamic loader which get triggered on thread destruction. It also allows setting a gdb breakpoint in sigaction().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45070 Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/ntdll/server.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index ec03445..689f0e7 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -1399,6 +1399,9 @@ void server_init_process(void) sigaddset( &server_block_set, SIGUSR1 ); sigaddset( &server_block_set, SIGUSR2 ); sigaddset( &server_block_set, SIGCHLD ); +#ifdef SIGTRAP + sigaddset( &server_block_set, SIGTRAP ); +#endif pthread_sigmask( SIG_BLOCK, &server_block_set, NULL );
/* receive the first thread request fd on the main socket */