mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
ntdll: Preserve errno across system calls done in the suspend handler.
This commit is contained in:
parent
b281d3f8d8
commit
970b34291e
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue