[Github-comments] [geany/geany] Geany should recover itself from Unix Domain socket issues (#2102)

Daniel Barrows notifications at xxxxx
Wed Mar 13 21:19:36 UTC 2019


@elextr It sounds like you're proposing a fix which will prevent this Geany mis-configuration from occurring, regardless of how `sudo` is configured. I suggest that discussion about such a fix should go elsewhere, probably at #1411. While a decision to follow your proposal would make this obsolete, given that this has been an issue [since at least 2014](https://github.com/geany/geany/issues/294#issue-36252042), it seems reasonable to me that a fix be implemented in the meantime.

I'm proposing that regardless of what is decided about #1411, Geany should facilitate recovery from configuration problems. While this one seems to always be due to the `sudo` issue, mis-configuration can occur due to system crashes, users messing with files, Geany upgrades, etc. I think it's appropriate for software to try to help users with these kinds of issues recover from the problem.

As far as practical implementation, Geany could try to detect if there actually is a configuration problem. It could do this be checking:
  1. If the socket file (~/.config/geany/geany_socket*) is a symlink to a non-existent file. (Probably the best method)
  2. If there is a currently running process named geany (eg. `ps -A |grep geany`). Obviously, it would need to ignore the currently running Geany process.

Note that this issue detection step need not be 100% accurate. The dialog could make a recommendation accordingly, eg. "There doesn't appear to be a running instance of Geany, but it is possible that it is aliased somehow. Please delete the socket link *only* if you are sure that Geany isn't currently running."

Alternately, Geany could offer to delete the file without doing any checking whatsoever. The warning in this case might read, "Only delete this file if you continue to experience this error after restarting your system." Y'all know the risks better than I do; explain them to users as you see fit.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2102#issuecomment-472609955
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190313/280d518b/attachment.html>


More information about the Github-comments mailing list