0

I know there are hundreds of questions on "How to kill a defunct process" but in all of those I found the final answer was: "Don't worry. They don't use any resources." and that basically you either have to kill the parent or reboot the system.

In my case I can neither reboot the system, nor kill the parent (gnome-shell) process.

While my zombie does not eat CPU or RAM, it prevents me from using audacity. The defunct process was audacity and whenever I try to launch it now it reports that it's already running, even though it has been -9 killed (after it became unresponsive).

What are my options? Can I "rename" the process somehow or assign another PID to it?

Lesmana
  • 27,439
confetti
  • 1,964

1 Answers1

2

Easy solution that works in my case: Audacity saves a process lock file under /var/tmp/audacity-<username> called audacity-lock-<username>. Deleting this file made me able to start another instance of audacity.

Leaving this answer to help others with similar issues, suggesting them to look for lock files. Still interested in other options for this kinda problem though, if the program in question doesn't use a lock file and refers to the system's current process table (without checking for zombies) for example.

confetti
  • 1,964
  • 1
    leaving zombies is most of the time a bug. In the worst case, if you can't afford to kill the application but need to clean those zombies and you are really desperate, you can connect a gdb debugger to the process and execute a few syscalls to wait on those zombies (to get the idea: https://stackoverflow.com/questions/1323956/how-to-redirect-output-of-an-already-running-process/1323999#1323999 or https://unix.stackexchange.com/questions/457117/how-to-unshare-network-for-current-process/457321#457321) – A.B Aug 04 '18 at 16:58