Sebastian Lackner : ntdll: Avoid possible deadlock by using _exit() in NtTerminateProcess.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 17 08:03:40 CDT 2015
Module: wine
Branch: master
Commit: 4a1629c4117fda9eca63b6f56ea45771dc9734ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a1629c4117fda9eca63b6f56ea45771dc9734ac
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Fri Jul 17 06:46:47 2015 +0200
ntdll: Avoid possible deadlock by using _exit() in NtTerminateProcess.
When threads are killed with SIGQUIT some locks can be in an undefined
state, and it not safe to call exit handlers.
---
dlls/ntdll/process.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index c69de5e..ca9462a 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -21,11 +21,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -60,7 +65,7 @@ NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
self = !ret && reply->self;
}
SERVER_END_REQ;
- if (self && handle) exit( exit_code );
+ if (self && handle) _exit( exit_code );
return ret;
}
More information about the wine-cvs
mailing list