If you've ever attempted to do any serious work on a Windows box configured with cygwin and a sshd, you've probably already come across the dreaded error message as you attempt to remove a file or folder
"Device or Resource busy"
If, not you probably will - sooner or later. You can't rm the files or folders, your compile is stuck as it can't write objs to disk - or whatever else your file access scenario may be.
SysInternals Handle to the rescue!
Handle will merrily show you what process is holding a handle to the specified file or folder. Once the perpetrator is located, taskkill /PID n, makes for the easy solution.
Simple, yet extremely effective trick for the toolbox...
(In all fairness, the latest 1.7.7 cygwin is a lot better than the previous versions :))
Subscribe to:
Post Comments (Atom)
Thanks much! :)
ReplyDeleteAnd if Process is "System"? pid = 4?
ReplyDeleteHow to unlock?
It's simple and tricky issue.
ReplyDeleteHow to Delete Resource
Go to Task Manager -> Details (tab)
Now, End Process of cmd.exe. That's the magic.
If you come back and delete. It shall delete.
This solution worked to me. Try and let us know if there any other solution.