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.
http://stackoverflow.com/questions/10512743/what-is-happening-when-i-press-control-c-in-the-r-terminal

On 12-06-18 10:33 AM, r-bugs@r-project.org wrote:
> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14948
>
> Summary: Windows R on control-C closes but terminal still
> stealing input
> Product: R
> Version: R 2.15.0 patched
> Platform: All
> OS/Version: Windows 64-bit
> Status: NEW
> Severity: normal
> Priority: P5
> Component: Windows GUI / Window specific
> AssignedTo: R-core@R-project.org
> ReportedBy: matt.hickford@gmail.com
> Estimated Hours: 0.0
>
>
> 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.
>
> http://stackoverflow.com/questions/10512743/what-is-happening-when-i-press-control-c-in-the-r-terminal
>
I can confirm this --- I'll take a look. What appears to be happening
is that the Ctrl-C kills the R process, but R started Rterm, and the
Rterm process is still running.
Windows documentation for console-mode programs is notoriously awful, so
I'm not sure I'll be able to find how to fix this, but I'll try. In the
meantime, just like the doctor said, "don't do that".
Duncan Murdoch