[Rd] sending signals to embedded R

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat May 5 00:17:01 CEST 2007


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



More information about the R-devel mailing list