PR#5982: save and restore the value of errno in caml_leave_blocking_section
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13668 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
d69bd84bb3
commit
5de2108817
|
@ -14,6 +14,7 @@
|
|||
/* Signal handling, code common to the bytecode and native systems */
|
||||
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include "alloc.h"
|
||||
#include "callback.h"
|
||||
#include "config.h"
|
||||
|
@ -115,8 +116,12 @@ CAMLexport void caml_enter_blocking_section(void)
|
|||
|
||||
CAMLexport void caml_leave_blocking_section(void)
|
||||
{
|
||||
int saved_errno;
|
||||
/* Save the value of errno (PR#5982). */
|
||||
saved_errno = errno;
|
||||
caml_leave_blocking_section_hook ();
|
||||
caml_process_pending_signals();
|
||||
errno = saved_errno;
|
||||
}
|
||||
|
||||
/* Execute a signal handler immediately */
|
||||
|
|
Loading…
Reference in New Issue