diff options
Diffstat (limited to 'src/env.c')
-rw-r--r-- | src/env.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,5 +1,5 @@ /* env - run a program in a modified environment - Copyright (C) 1986-2014 Free Software Foundation, Inc. + Copyright (C) 1986-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -69,7 +69,7 @@ Set each NAME to VALUE in the environment and run COMMAND.\n\ \n\ A mere - implies -i. If no COMMAND, print the resulting environment.\n\ "), stdout); - emit_ancillary_info (); + emit_ancillary_info (PROGRAM_NAME); } exit (status); } @@ -144,7 +144,7 @@ main (int argc, char **argv) char *const *e = environ; while (*e) printf ("%s%c", *e++, opt_nul_terminate_output ? '\0' : '\n'); - exit (EXIT_SUCCESS); + return EXIT_SUCCESS; } if (opt_nul_terminate_output) @@ -155,9 +155,7 @@ main (int argc, char **argv) execvp (argv[optind], &argv[optind]); - { - int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); - error (0, errno, "%s", argv[optind]); - exit (exit_status); - } + int exit_status = errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE; + error (0, errno, "%s", argv[optind]); + return exit_status; } |