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.
我正在尝试终止 C++ 程序(Linux)中的进程。我确切地知道要杀死的程序的名称。如果我尝试使用 Bash
pkill process-name
该进程被正常终止。
如果我在一个简单的 C++ 程序中运行main
main
system("pkill process-name")
该过程继续运行。
我不知道为什么...