From 040d6e8106a2c4f369fe22c2d6875dc50608d2ab Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Sun, 2 Aug 2020 18:05:29 +0200 Subject: [PATCH] transition systemd commands to --no-block --- src/stream/commander/systemd.clj | 5 +++-- test/stream/commander_test.clj | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/stream/commander/systemd.clj b/src/stream/commander/systemd.clj index ebe65bb..8b4d9ca 100644 --- a/src/stream/commander/systemd.clj +++ b/src/stream/commander/systemd.clj @@ -76,8 +76,9 @@ ;; The commands are implemented synchronousily. (defn- run-systemd-command! [& commands] - (let [result (apply sh "systemctl" "-q" "--job-mode=replace" - "--user" "--job-mode=replace" commands)] + (let [result (apply sh "systemctl" "--no-block" + "--job-mode=replace" "--user" "--job-mode=replace" + commands)] (if (= (:exit result) 0) true (throw+ {:type ::systemd-error diff --git a/test/stream/commander_test.clj b/test/stream/commander_test.clj index 920f48d..75372d2 100644 --- a/test/stream/commander_test.clj +++ b/test/stream/commander_test.clj @@ -66,21 +66,26 @@ (testing "starting the service" (systemd/start-service! name) - (a/