[Rd] sending signals to embedded R

Deepayan Sarkar deepayan.sarkar at gmail.com
Sat May 5 00:34:48 CEST 2007


On 5/4/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> 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.

I didn't mean to imply that it does. I'm just new to signals and
things that should be obvious aren't.

Basically kill(2) seems to be the right thing to use, but I wasn't
sure what the PID needs to be. Turns out sending SIGINT to my GUI from
a shell interrupts R, so raise(SIGINT) should be enough.

-Deepayan



More information about the R-devel mailing list