diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2018-08-30 12:48:50 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2018-08-30 13:14:10 +0200 |
commit | 03ed2aae3a54afcc521a1af9b8a62827c1fb76d6 (patch) | |
tree | b3663e135f329f3186e3c67d94a20974c0225381 /scripts | |
parent | 3d5c4847b663c42573ffabba7f26f30196f54d82 (diff) | |
download | lvm2-03ed2aae3a54afcc521a1af9b8a62827c1fb76d6.tar.gz |
scripts: lvm2-activation-generator: also log possible execv error
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/generator-internals.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |