diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-11-28 04:34:09 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-11-28 04:34:09 +0100 |
commit | 1c31e9e82b12bdceeec4f8e07955984e20ee6b7e (patch) | |
tree | 7b06f2898ba16ea00b77c5a2d1295c37753a8c4d | |
parent | 57542ebe4fee39b6d3091b964c42ce07ecfec7ef (diff) | |
download | busybox-w32-1c31e9e82b12bdceeec4f8e07955984e20ee6b7e.tar.gz busybox-w32-1c31e9e82b12bdceeec4f8e07955984e20ee6b7e.tar.bz2 busybox-w32-1c31e9e82b12bdceeec4f8e07955984e20ee6b7e.zip |
use BB_EXECVP_or_die where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | init/bootchartd.c | 3 | ||||
-rw-r--r-- | networking/nc_bloaty.c | 3 | ||||
-rw-r--r-- | selinux/runcon.c | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/init/bootchartd.c b/init/bootchartd.c index 5a1b3e8e8..ac3f261c8 100644 --- a/init/bootchartd.c +++ b/init/bootchartd.c | |||
@@ -441,8 +441,7 @@ int bootchartd_main(int argc UNUSED_PARAM, char **argv) | |||
441 | pid_t pid = xvfork(); | 441 | pid_t pid = xvfork(); |
442 | if (pid == 0) { /* child */ | 442 | if (pid == 0) { /* child */ |
443 | argv += 2; | 443 | argv += 2; |
444 | execvp(argv[0], argv); | 444 | BB_EXECVP_or_die(argv); |
445 | bb_perror_msg_and_die("can't execute '%s'", argv[0]); | ||
446 | } | 445 | } |
447 | /* parent */ | 446 | /* parent */ |
448 | waitpid(pid, NULL, 0); | 447 | waitpid(pid, NULL, 0); |
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index 3c622e51e..e98a5dd5b 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c | |||
@@ -268,8 +268,7 @@ static int doexec(char **proggie) | |||
268 | dup2(0, 1); | 268 | dup2(0, 1); |
269 | /* dup2(0, 2); - do we *really* want this? NO! | 269 | /* dup2(0, 2); - do we *really* want this? NO! |
270 | * exec'ed prog can do it yourself, if needed */ | 270 | * exec'ed prog can do it yourself, if needed */ |
271 | execvp(proggie[0], proggie); | 271 | BB_EXECVP_or_die(proggie); |
272 | bb_perror_msg_and_die("can't execute '%s'", proggie[0]); | ||
273 | } | 272 | } |
274 | 273 | ||
275 | /* connect_w_timeout: | 274 | /* connect_w_timeout: |
diff --git a/selinux/runcon.c b/selinux/runcon.c index b70a5e396..54349b25c 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c | |||
@@ -132,6 +132,5 @@ int runcon_main(int argc UNUSED_PARAM, char **argv) | |||
132 | bb_error_msg_and_die("can't set up security context '%s'", | 132 | bb_error_msg_and_die("can't set up security context '%s'", |
133 | context_str(con)); | 133 | context_str(con)); |
134 | 134 | ||
135 | execvp(argv[0], argv); | 135 | BB_EXECVP_or_die(argv); |
136 | bb_perror_msg_and_die("can't execute '%s'", argv[0]); | ||
137 | } | 136 | } |