Distriction specific patch, not going upstream Disable systemd-run if the command is not found. diff --git a/xpra/scripts/main.py b/xpra/scripts/main.py index 1c5e8ddaad..084aabe792 100755 --- a/xpra/scripts/main.py +++ b/xpra/scripts/main.py @@ -396,23 +396,26 @@ def use_systemd_run(s) -> bool: cmd = ["systemd-run", "--quiet"] if getuid() != 0: cmd += ["--user"] - cmd += ["--scope", "--", "true"] - proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) try: - proc.communicate(timeout=2) - r = proc.returncode - except TimeoutExpired: # pragma: no cover - r = None - if r is None: - try: - proc.terminate() - except Exception: - pass + cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] + proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) try: - proc.communicate(timeout=1) + proc.communicate(timeout=2) + r = proc.returncode except TimeoutExpired: # pragma: no cover r = None - return r == 0 + if r is None: + try: + proc.terminate() + except Exception: + pass + try: + proc.communicate(timeout=1) + except TimeoutExpired: # pragma: no cover + r = None + return r==0 + except FileNotFoundError: + return False def verify_gir(): e/store-api.cc?id=a2a3264bb38568e892e69e64dcfd12829a9975ce'>diff
path: root/nix/libstore/store-api.cc
AgeCommit message (Expand)Author
2024-11-17daemon: Improve error message in ‘checkStoreName’....* nix/libstore/store-api.cc (checkStoreName): Clarify message when NAME starts with a dot. Change-Id: I045a663bc6cd9844677c65b38a31d3941cf212b5 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Brennan Vincent