Don't crash when there is a leftover socket file - #13
Conversation
Previously, when there was a socket file in the current directly and no server was running, 'hdevtools check' would fail with: hdevtools: bind: resource busy (Address already in use)
bitc
commented
Feb 24, 2013
I'll have to think about this... Can you please explain under what circumstances you end up with the leftover socket file? It should usually be automatically deleted when the hdevtools server exits. |
takano-akio
commented
Mar 7, 2013
It mainly happens when I have to kill a hdevtools process with SIGKILL. |
bitc
commented
Mar 7, 2013
The proper way to stop the hdevtools process is to run This should make sure that the socket file is cleaned up. |
takano-akio
commented
Mar 7, 2013
Yes, I know that. However when the machine is running out of memory Also I believe that the socket file will be left on hard reset of the computer, for example. |
lightquake
commented
Mar 14, 2013
I can't say I've been bitten by this, but I think it's best to remove stale socket files because hdevtools could require a kill -9, or it might get killed by something else beyond user control, etc. |
bmjames
commented
Jan 24, 2014
I found this pull request when I encountered the same problem. I do not know how I ended up with the stale socket file, but there it was, so I had to solve the problem some way. Perhaps the program could at least exit with a more descriptive message about the stale socket file. If the message included the path to the file, it would be completely obvious what the user needs to do to fix the problem. |
jergason
commented
Mar 1, 2015
I ended up with a leftover I'd love to see this merged in. |
sgillis
commented
May 26, 2015
I encountered this when running hdevtools inside a Docker container with host volumes mounted into the container. When the container is removed the stale socket remains on the host system. |
schell
commented
May 27, 2015
I am constantly removing this socket file to re-check after making changes to included libraries so I don't see the harm in automating it (at least in certain circumstances). |
schell
commented
May 27, 2015
I'll have to merge this into my branch, @bitc isn't active in this repo as far as I know. |
schell
commented
May 31, 2015
I've merged this request into my fork and pushed it up to hackage. |
Findsymbol command :+1:
When there is a socket file in the current directly and no server is running, 'hdevtools check' fails with:
hdevtools: bind: resource busy (Address already in use)