简体   繁体   中英

How to stop embedded R process in rpy2 using python/ipython

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM