From 03ed2aae3a54afcc521a1af9b8a62827c1fb76d6 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 30 Aug 2018 12:48:50 +0200 Subject: [PATCH] scripts: lvm2-activation-generator: also log possible execv error --- scripts/generator-internals.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/generator-internals.c b/scripts/generator-internals.c index c38323b2e..00a15e547 100644 --- a/scripts/generator-internals.c +++ b/scripts/generator-internals.c @@ -56,7 +56,8 @@ static bool _open_child(struct child_process *child, const char *cmd, const char close(pipe_fd[1]); } - execv(cmd, (char *const *) argv); + if (execv(cmd, (char *const *) argv) < 0) + _error("execv failed: %s\n", strerror(errno)); // Shouldn't get here unless exec failed. exit(1); } else { -- 2.43.5