How can I stop a running R command in linux other than with Ctrl + C?

前端 未结 4 2018
孤城傲影
孤城傲影 2020-12-24 05:52

I\'m running R in interactive mode under Linux and mistakenly typed in a command that takes forever to run. I usually stop it using Ctrl + C. But it do

4条回答
  •  执念已碎
    2020-12-24 06:15

    Try to use Ctrl + C, pause R with Ctrl + Z, and then unpause R with fg (#job).

    I tried the solutions given in previous answers with sending some signals to R with kill, but neither worked. Then I tried the sequence above (Ctrl + C, Ctrl + Z, and fg 1) and it worked. I could continue the R session.

    I'm not sure whether it was one of the signals or Ctrl + C that stopped R, but I guess Ctrl + Z was essential here.

提交回复
热议问题