Reputation: 137554
I open a Windows command prompt. I run R R
. When I press Control-C in the R terminal, something weird happens. It appears to exit R and take me back to the command prompt, BUT now when I type commands they are fought over by the command prompt and a R terminal hiding in the background . What's going on?
C:\Users\hickfordm>R
R version 2.15.0 (2012-03-30)
> ^C
c:\users\hickfordm>dir
'ir' is not recognized as an internal or external command, operable program or batch file.
c:\users\hickfordm>
Error: object 'd' not found
Edit: This happens to me only if I run R
. If I run Rterm
, control-C does nothing, which is reasonable.
Upvotes: 1
Views: 799
Reputation: 137554
My friend was able to reproduce this on Windows with R
, but not Rterm
. Doesn't happen on Linux. This must be a bug in R. I'll endeavour to report it https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14948
Fixed upstream, expect fix to make R 2.16
Meanwhile, fixed in R patched 2.15.1 http://cran.r-project.org/bin/windows/base/rpatched.html (not vanilla 2.15.1)
Upvotes: 1
Reputation: 380
In R terminal, try this:
>while(1){}
and then type control + c.
I try it on Linux. When I type control + c, the loop terminal. But R terminal didn't exit. I didn't try it on Windows.
Upvotes: 0