From deepayan.sarkar at gmail.com  Sat May  5 00:34:48 2007
From: deepayan.sarkar at gmail.com (Deepayan Sarkar)
Date: Fri, 4 May 2007 15:34:48 -0700
Subject: [Rd] sending signals to embedded R
In-Reply-To: <Pine.LNX.4.64.0705042309520.21366@gannet.stats.ox.ac.uk>
References: <eb555e660705041448h27679664o21522a5d04285d74@mail.gmail.com>
	<Pine.LNX.4.64.0705042309520.21366@gannet.stats.ox.ac.uk>
Message-ID: <eb555e660705041534r32c2d62di7309b5a457456c7c@mail.gmail.com>

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



[Rd] sending signals to embedded R
Deepayan Sarkar