qtile: fix crash on musl

This commit is contained in:
classabbyamp 2025-03-13 18:10:41 -04:00
parent b0f4d333d3
commit f0845a6cd6
No known key found for this signature in database
GPG key ID: 6BE0755918A4C7F5
2 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,16 @@
musl doesn't have posix_spawn_file_actions_addclosefrom_np, so python doesn't
have os.POSIX_SPAWN_CLOSEFROM on musl.
see: https://github.com/qtile/qtile/issues/5210
--- a/libqtile/core/manager.py
+++ b/libqtile/core/manager.py
@@ -1331,7 +1331,7 @@
(os.POSIX_SPAWN_DUP2, 2, null.fileno()),
]
- if sys.version_info.major >= 3 and sys.version_info.minor >= 13:
+ if hasattr(os, "POSIX_SPAWN_CLOSEFROM"):
# we should close all fds so that child processes don't
# accidentally write to our x11 event loop or whatever; we never
# used to do this, so it seems fine to only do it on python 3.13 or

View file

@ -1,7 +1,7 @@
# Template file for 'qtile'
pkgname=qtile
version=0.31.0
revision=1
revision=2
build_style=python3-pep517
_wlroots=0.17
hostmakedepends="python3-setuptools_scm python3-cairocffi python3-xcffib python3-wheel