twosigma/beaker-notebook — pull request #541 by scottdraves (2014-09-03 20:56:50+00:00)
Title: Fix Issue #44 Make R evaluation interruptible

This is not easy and it does not always work because not all R operations can be interrupted.
But presumably R users are used to this and it's the best we can do.
The way it works is, when R starts a new session we ask it for its unix PID.
Then, we interrupt it by sending a SIGINT.
The weird part is someone (Rserve?) is printing an extra empty line which must be suppressed lest our output tray pop up.

This will not work on windows, will need more work there.