0

I am using rpy2 to execute R from ipython. However I want to kill or stop the embedded R process but Ctrl-C is not working.

This is maybe because ipython intercepts SIGINT (I am not sure)..

I tested with SIGSTOP (Ctrl+Z) and it works..

Any method to terminate the embedded process (R/rpy2) without killing the ipython/python session?

Thanks

gc5
  • 9,468
  • 24
  • 90
  • 151

1 Answers1

0

When in Python, it is possible to interrupt R code with SIGINT (see unitest with SIGINT in rpy2), to the extent that this R code is not a call to C not checking interruption signals (and in that case it would not be possible to interrupt the same code when in R).

I am unsure about what is happening with iPython.

lgautier
  • 11,363
  • 29
  • 42
  • I found [a new PR](https://github.com/rpy2/rpy2/pull/832) (merged by you, right?). It would be better to update this answer after a new version is released (maybe 3.5.0), for people who is led to this question like me. :) – Ben Lee Dec 28 '21 at 01:05