Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我注意到当我执行以下操作时,gnome-terminal 只是进入“僵尸状态”
char *cmd = "kill <pidofterminal>" popen(cmd, "r");
有没有办法完全杀死程序?我需要它来释放它的 PID。
您可以-9在 kill 命令中指定
-9
char *cmd = "kill -9 <pidofterminal>" popen(cmd, "r");
在 sudo 或 root 下运行程序:
sudo ./program
它将杀死您可以杀死的所有进程。