Skip to content
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

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

MIvanchev
Copy link
Contributor

@MIvanchev MIvanchev commented Oct 12, 2024

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.

@MIvanchev MIvanchev changed the title Exclusive file lock during cmd execution. Exclusive file lock during cmd execution and some bugs. Oct 13, 2024
@dmb2 dmb2 merged commit 6bfed60 into stumpwm:master Nov 29, 2024
@catap
Copy link
Contributor

catap commented Nov 29, 2024

@dmb2, @MIvanchev this PR brokes support of non-Linux systems which may not have /proc at all.

catap added a commit to catap/stumpwm-contrib that referenced this pull request Nov 29, 2024
This fixes regression which was introduced by
stumpwm#296
@MIvanchev
Copy link
Contributor Author

MIvanchev commented Nov 29, 2024

@catap What's an alternative for OpenBSD? I.e. can you modify the script with OpenBSD specific stuff? IMHO this change is significant.

@catap
Copy link
Contributor

catap commented Nov 29, 2024

@MIvanchev I just did, see #298

@MIvanchev
Copy link
Contributor Author

@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 /proc is there.

@catap
Copy link
Contributor

catap commented Nov 29, 2024

@MIvanchev
Copy link
Contributor Author

@catap посмотрим!

catap added a commit to catap/stumpwm-contrib that referenced this pull request Nov 30, 2024
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]>
catap added a commit to catap/stumpwm-contrib that referenced this pull request Nov 30, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants