use BB_EXECVP_or_die where appropriate
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 28 Nov 2010 03:34:09 +0000 (04:34 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 28 Nov 2010 03:34:09 +0000 (04:34 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
init/bootchartd.c
networking/nc_bloaty.c
selinux/runcon.c

index 5a1b3e8e886248641ef9ade3e50b2dfdc8bfd735..ac3f261c805d48d759eb8ab1326f3e16f1fe9821 100644 (file)
@@ -441,8 +441,7 @@ int bootchartd_main(int argc UNUSED_PARAM, char **argv)
                pid_t pid = xvfork();
                if (pid == 0) { /* child */
                        argv += 2;
-                       execvp(argv[0], argv);
-                       bb_perror_msg_and_die("can't execute '%s'", argv[0]);
+                       BB_EXECVP_or_die(argv);
                }
                /* parent */
                waitpid(pid, NULL, 0);
index 3c622e51ecddbf208e2659949b06d23b3bf19993..e98a5dd5b172a222e1598bdd0c0ea10b73a3cf34 100644 (file)
@@ -268,8 +268,7 @@ static int doexec(char **proggie)
        dup2(0, 1);
        /* dup2(0, 2); - do we *really* want this? NO!
         * exec'ed prog can do it yourself, if needed */
-       execvp(proggie[0], proggie);
-       bb_perror_msg_and_die("can't execute '%s'", proggie[0]);
+       BB_EXECVP_or_die(proggie);
 }
 
 /* connect_w_timeout:
index b70a5e396bbec17026bf45b9834186f63c331b1e..54349b25c9b806e3bef418e1034d17e132bd53fb 100644 (file)
@@ -132,6 +132,5 @@ int runcon_main(int argc UNUSED_PARAM, char **argv)
                bb_error_msg_and_die("can't set up security context '%s'",
                                     context_str(con));
 
-       execvp(argv[0], argv);
-       bb_perror_msg_and_die("can't execute '%s'", argv[0]);
+       BB_EXECVP_or_die(argv);
 }