From 46f7add84ce5e54d405ef0cf8bc6814c3e8e9d35 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 22 Mar 2021 18:43:01 +0100 Subject: [PATCH] garlicd: use head instead of the read builtin It seems that bash is unable to propagate the SIGINT while reading from the FIFO. This fixes the anoying ^C^C^C problems found when running garlicd. --- garlic/garlicd/garlicd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/garlic/garlicd/garlicd b/garlic/garlicd/garlicd index 4dfb8ed..cc67089 100755 --- a/garlic/garlicd/garlicd +++ b/garlic/garlicd/garlicd @@ -47,7 +47,7 @@ done while true; do msg "Waiting for experiments ..." - read -r tre < "$run" + tre=$(head -1 "$run") msg "Attempting to run: $tre" msg "Copying files to MN4..." @@ -65,7 +65,7 @@ while true; do msg "Waiting for nix to finish the build..." - read -r tre2 < "$wipe" + tre2=$(head -1 "$wipe") if [ "$tre" != "$tre2" ]; then msg "error: trebuchet mismatch" exit 1