问题
In order to terminate the ghost process (process which hasn't terminated properly and hence it still pending to be killed) I used the
kill -9 <process-id>
At times it works perfectly, and when I check the process after killing it, it is gone
ps -aux | grep python
However, surprisingly, now I am able to see the ghost process even after the kill
command. What's the problem?
In the image above, I tried to kill the process with id 23756 but it still appears in ps aux
Referring to my answer to previous question of Visual Studio ghost process
VSCode kill running processes
回答1:
Looks like, I had to close the debug process that was still incomplete. Basically, killing the application or closing the debug or something on those lines, helps you to terminate the ghost process.
来源:https://stackoverflow.com/questions/52562914/kill-doesnt-actually-terminate-the-ghost-process