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 3813331a5..46e2c83a6 100755 --- a/xpra/scripts/main.py +++ b/xpra/scripts/main.py @@ -337,23 +337,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(): try: d=87aef1a9b8cc794c7d32336f23a99b58c05be5a5'>diff
path: root/gnu/services/docker.scm
AgeCommit message (Expand)Author
2024-01-03services: docker: Add config-file option....Connor Clark
2023-12-10services: Fix oci-container-service-type container user....Giacomo Leidi
2023-11-23services: Add oci-container-service-type....Giacomo Leidi
2023-08-08file-systems: Use cgroups v2....Sam Lockart
2022-07-13services: docker: Fix race condition....Oleg Pykhalov