Commit 970b3429 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent b281d3f8
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "wine/port.h" #include "wine/port.h"
#include <assert.h> #include <assert.h>
#include <errno.h>
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -147,6 +148,7 @@ extern DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_R ...@@ -147,6 +148,7 @@ extern DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_R
void wait_suspend( CONTEXT *context ) void wait_suspend( CONTEXT *context )
{ {
LARGE_INTEGER timeout; LARGE_INTEGER timeout;
int saved_errno = errno;
/* store the context we got at suspend time */ /* store the context we got at suspend time */
SERVER_START_REQ( set_thread_context ) SERVER_START_REQ( set_thread_context )
...@@ -173,6 +175,8 @@ void wait_suspend( CONTEXT *context ) ...@@ -173,6 +175,8 @@ void wait_suspend( CONTEXT *context )
wine_server_call( req ); wine_server_call( req );
} }
SERVER_END_REQ; SERVER_END_REQ;
errno = saved_errno;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment