I have a shell command in stuck in D state (imagine doing ls on a NFS share when the network is down).

How do I detach from such a command? I can't kill the process in any way (well, it's called "uninterruptible" for a reason), and ctrl-z does nothing, so I have no place to type detach.

Please don't propose workarounds (like "just open new terminal", "use screen/tmux", etc.), I know them, I'm just curious for a better solution =)

PS: This may be a duplicate, but all I was able to find is threads like "Q:ctrl-c does not work A: use kill-9"

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.