-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclusive file lock during cmd execution and some bugs. #296
Conversation
@dmb2, @MIvanchev this PR brokes support of non-Linux systems which may not have |
This fixes regression which was introduced by stumpwm#296
@catap What's an alternative for OpenBSD? I.e. can you modify the script with OpenBSD specific stuff? IMHO this change is significant. |
@MIvanchev I just did, see #298 |
@catap I checked it out, I think it's better to do it outside of the while loop, the loop only makes sense if you want to nagivate the proc chain up when |
@MIvanchev maybe rewrite it to https://www.man7.org/linux/man-pages/man1/pgrep.1.html ? |
@catap посмотрим! |
Seems that `pgrep` exists everywhere, for example in Debian it is installed from the same package which installs `ps` and `kill`. Use it as main way to detect stumpwm, and old code via /proc as a fallback when no `pgrep` here. This fixes regression which was introduced by stumpwm#296 Co-authored-by: Mihail Ivanchev <[email protected]>
Seems that `pgrep` exists everywhere, for example in Debian it is installed from the same package which installs `ps` and `kill`. Use it as main way to detect stumpwm, and old code via /proc as a fallback when no `pgrep` here. This fixes regression which was introduced by stumpwm#296 Co-authored-by: Mihail Ivanchev <[email protected]>
This MR is to ensure that stumpish only runs commands with an exclusive file lock and verifies that there is actually a StumpWM process running. There are a lot of issues with stumpish and it requires an overhaul but it's a beginning.