caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: Eijiro Sumii <sumii@ecei.tohoku.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] infinite loop that cannot be interrupted by Control-C
Date: Wed, 7 Dec 2005 18:55:00 +1300	[thread overview]
Message-ID: <ad8cfe7e0512062155k27e8e27pca9fe2479362169d@mail.gmail.com> (raw)
In-Reply-To: <a4d0794e0512062149n3908b6bo8c2dc9c167039c50@mail.gmail.com>

> It seems that the infinite loop
>
>  let rec x = 1 :: x in x = x ;;
>
> cannot be interrupted by Control-C in the interactive session of
> Objective Caml 3.09.0

This is probably because of the way the interpreter is designed.

Signals are only checked after function calls, and one other operation
I can't remember off hand. Obviously, in your example, neither of
these cases occur, so ocaml doesn't get a chance to check for any
signals: hence, can't be interrupted.

Jonathan


  reply	other threads:[~2005-12-07  5:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07  5:49 Eijiro Sumii
2005-12-07  5:55 ` Jonathan Roewen [this message]
2005-12-07  6:06 ` Eijiro Sumii

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=ad8cfe7e0512062155k27e8e27pca9fe2479362169d@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=sumii@ecei.tohoku.ac.jp \
    /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).