From f5b67c0fd5f5cf15ea58fc060fd5d5998a37eb49 Mon Sep 17 00:00:00 2001 From: Chris Down Date: Fri, 26 Apr 2024 08:46:08 +0100 Subject: [PATCH] run_clipserve: Give a better error message on exec() failure --- src/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 72f29db..2beaa0e 100644 --- a/src/util.c +++ b/src/util.c @@ -65,7 +65,8 @@ void run_clipserve(uint64_t hash) { return; } - expect(execvp(cmd[0], (char *const *)cmd) >= 0); + execvp(cmd[0], (char *const *)cmd); + die("Failed to exec %s: %s\n", cmd[0], strerror(errno)); } /**