]> sourceware.org Git - lvm2.git/commitdiff
scripts: lvm2-activation-generator: also log possible execv error
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 30 Aug 2018 10:48:50 +0000 (12:48 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 30 Aug 2018 11:14:10 +0000 (13:14 +0200)
scripts/generator-internals.c

index c38323b2e713ec7f046c78db34c3a69dfa5173e0..00a15e5473a0138b16653ff68e00c9a2e7d6f331 100644 (file)
@@ -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 {
This page took 0.036552 seconds and 5 git commands to generate.