caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dmitri Boulytchev <dboulytchev@gmail.com>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] Sys.signal / Sys.set_signal broken in native code?
Date: Sun, 22 Apr 2018 16:16:59 +0300	[thread overview]
Message-ID: <b0c6739f-35c0-fb19-7d91-473609c786fd@gmail.com> (raw)

     Hello,


     Sys.signal / Sys.set_signal doest not work in native code. The 
following code


     let _ =
       Sys.set_signal Sys.sigalrm (Sys.Signal_handle (fun _ -> failwith 
"Timeout..."));
       ignore (Unix.alarm 5);
       while true do () done


     loops forever being compiled with ocamlopt (and raises the expected 
exception with ocamlc). Am I missing something?

     Ubuntu 16.04 64bit, tried with 4.06.0 and 4.06.1


     Best regards,

     Dmitry Boulytchev,

     St Petersburg State University.


-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

             reply	other threads:[~2018-04-22 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22 13:16 Dmitri Boulytchev [this message]
2018-04-22 13:33 ` ygrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0c6739f-35c0-fb19-7d91-473609c786fd@gmail.com \
    --to=dboulytchev@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).