aboutsummaryrefslogtreecommitdiff
path: root/coreutils/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/env.c')
-rw-r--r--coreutils/env.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/coreutils/env.c b/coreutils/env.c
index 9635d2b22..d4eab191b 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -76,11 +76,8 @@ int env_main(int argc UNUSED_PARAM, char **argv)
76 ++argv; 76 ++argv;
77 } 77 }
78 78
79 if (*argv) { 79 if (argv[0]) {
80 BB_EXECVP(*argv, argv); 80 BB_EXECVP_or_die(argv);
81 /* SUSv3-mandated exit codes. */
82 xfunc_error_retval = (errno == ENOENT) ? 127 : 126;
83 bb_simple_perror_msg_and_die(*argv);
84 } 81 }
85 82
86 if (environ) { /* clearenv() may set environ == NULL! */ 83 if (environ) { /* clearenv() may set environ == NULL! */