Alexandre Julliard : ntdll: Preserve errno across system calls done in the suspend handler.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 1 06:44:28 CDT 2007


Module: wine
Branch: master
Commit: 970b34291e85c47a11a0bfe107125f32ef2f75d1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=970b34291e85c47a11a0bfe107125f32ef2f75d1

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jun  1 11:16:09 2007 +0200

ntdll: Preserve errno across system calls done in the suspend handler.

---

 dlls/ntdll/exception.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
index 8974ced..c039dd4 100644
--- a/dlls/ntdll/exception.c
+++ b/dlls/ntdll/exception.c
@@ -23,6 +23,7 @@
 #include "wine/port.h"
 
 #include <assert.h>
+#include <errno.h>
 #include <signal.h>
 #include <stdarg.h>
 
@@ -147,6 +148,7 @@ extern DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_R
 void wait_suspend( CONTEXT *context )
 {
     LARGE_INTEGER timeout;
+    int saved_errno = errno;
 
     /* store the context we got at suspend time */
     SERVER_START_REQ( set_thread_context )
@@ -173,6 +175,8 @@ void wait_suspend( CONTEXT *context )
         wine_server_call( req );
     }
     SERVER_END_REQ;
+
+    errno = saved_errno;
 }
 
 




More information about the wine-cvs mailing list