diff options
author | Luc Maranget <luc.maranget@inria.fr> | 2014-03-13 12:44:09 +0000 |
---|---|---|
committer | Luc Maranget <luc.maranget@inria.fr> | 2014-03-13 12:44:09 +0000 |
commit | 1f5876189e29730e9b8f40c2808d1d7b84a37af0 (patch) | |
tree | 948ec02afaa09b40f4e8e8344cd99463ad96add8 /byterun/signals.c | |
parent | f69e779f366e356ffb03a9d334465dc073ee6c08 (diff) | |
download | ocaml-1f5876189e29730e9b8f40c2808d1d7b84a37af0.tar.gz |
Merge with ocaml trunk 12778 -> 13774
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/jocamltrunk@14456 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/signals.c')
-rw-r--r-- | byterun/signals.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/byterun/signals.c b/byterun/signals.c index 762884c09a..10f452b49a 100644 --- a/byterun/signals.c +++ b/byterun/signals.c @@ -11,11 +11,10 @@ /* */ /***********************************************************************/ -/* $Id: signals.c 12858 2012-08-10 14:45:51Z maranget $ */ - /* 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" @@ -117,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 */ |