Fentaniao
文章19
标签13
分类8
Clion Failed to Kill Process

Clion Failed to Kill Process

When running a C++ program with Clion, even if you click the stop button, you may find that the program is still running and has not been killed when you open the task manager.

Sometimes, if a program has an infinite loop, it will consume memory and eventually require a restart.

Solution

Solution 1

Some people have had this problem in the JetBrains community: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206620039-Clion-IDE-not-killing-processes-.

Also on Stack Overflow: https://stackoverflow.com/questions/51169357/unable-to-catch-sigint-sent-by-clion.

Their solution is to press shift+ctrl+A , then type Registry find run.processes.with.pty, and turn it off, or do it like this, **(Help -> Find Action -> Registry…)**。

But the strange thing is that this setting cannot be saved and will remain on when you reopen Clion.

Solution 2

I found a solution to save this setting on Zhihu: https://www.zhihu.com/question/50971066/answer/198448875

Create an idea.properties file in the .CLion2017.3\config folder with the following contents: run.processes.with.pty=false.

.CLion2017.3\config is generally under the user folder on the C drive.

本文作者:Fentaniao
本文链接:https://fentaniao.github.io/2021/10/10/Clion-cannot-kill-process/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可
×