diff options
| author | Emilio Jesus Gallego Arias | 2019-04-04 00:09:10 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-04-04 00:09:10 +0200 |
| commit | 2af2ea43c199177efe64678506e4fe419ea17404 (patch) | |
| tree | 2c6aa80ad8a9c8f2da4c803da89b3e6742d3887f /clib | |
| parent | f72de71c43f09554001bbe5808518171a68af335 (diff) | |
| parent | f374b79e08e135de11def93005110a833686c5f7 (diff) | |
Merge PR #9881: Protect some I/O routines from SIGALRM
Ack-by: SkySkimmer
Reviewed-by: ejgallego
Ack-by: maximedenes
Diffstat (limited to 'clib')
| -rw-r--r-- | clib/cThread.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clib/cThread.ml b/clib/cThread.ml index 9e0319e8f8..5fa44b1eec 100644 --- a/clib/cThread.ml +++ b/clib/cThread.ml @@ -100,10 +100,10 @@ let thread_friendly_input_value ic = (* On the ocaml runtime used in some opam-for-windows version the * [Thread.sigmask] API raises Invalid_argument "not implemented", * hence we protect the call and turn the exception into a no-op *) -let protect_sigalrm f x = +let mask_sigalrm f x = begin try ignore(Thread.sigmask Unix.SIG_BLOCK [Sys.sigalrm]) with Invalid_argument _ -> () end; f x let create f x = - Thread.create (protect_sigalrm f) x + Thread.create (mask_sigalrm f) x |
