From ripley at stats.ox.ac.uk  Sat May  5 00:17:01 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 4 May 2007 23:17:01 +0100 (BST)
Subject: [Rd] sending signals to embedded R
In-Reply-To: <eb555e660705041448h27679664o21522a5d04285d74@mail.gmail.com>
References: <eb555e660705041448h27679664o21522a5d04285d74@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0705042309520.21366@gannet.stats.ox.ac.uk>

On Fri, 4 May 2007, Deepayan Sarkar wrote:

> one thing I haven't been able to figure out from R-exts is how to
> interrupt a calculation running inside an embedded R. C code inside R
> calls R_CheckUserInterrupt() intermittently to check for interrupts,
> but how does my GUI tell R that the user wants it interrupted?

Well, the intention is that you send an interrupt, which hardly needs to 
be in the manual.

But SIGINT is caught and used to set R_interrupts_pending = 1, so you 
could risk using that non-API entry point (and be prepared to have your 
GUI broken at any time).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] sending signals to embedded R
Prof Brian Ripley