lineedit: do not hang on error, but return error indicator.
[oweals/busybox.git] / coreutils / env.c
index c6ba04d35482544656ce78dab4d86adb05ce9a7e..f50ee78693d287f708279680711fc2078d096650 100644 (file)
@@ -5,7 +5,7 @@
  * Copyright (c) 1988, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  *
  * Original copyright notice is retained at the end of this file.
  *
@@ -77,10 +77,7 @@ int env_main(int argc UNUSED_PARAM, char **argv)
        }
 
        if (argv[0]) {
-               BB_EXECVP(argv[0], argv);
-               /* SUSv3-mandated exit codes. */
-               xfunc_error_retval = (errno == ENOENT) ? 127 : 126;
-               bb_perror_msg_and_die("can't execute '%s'", argv[0]);
+               BB_EXECVP_or_die(argv);
        }
 
        if (environ) { /* clearenv() may set environ == NULL! */