diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 2 | ||||
-rw-r--r-- | shell/ash_test/printenv.c | 6 | ||||
-rw-r--r-- | shell/ash_test/recho.c | 2 | ||||
-rw-r--r-- | shell/ash_test/zecho.c | 2 | ||||
-rw-r--r-- | shell/bbsh.c | 2 | ||||
-rw-r--r-- | shell/hush.c | 2 | ||||
-rw-r--r-- | shell/msh.c | 8 |
7 files changed, 12 insertions, 12 deletions
diff --git a/shell/ash.c b/shell/ash.c index b45229b..fa063bf 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -4789,7 +4789,7 @@ openhere(union node *redir) full_write(pip[1], redir->nhere.doc->narg.text, len); else expandhere(redir->nhere.doc, pip[1]); - _exit(0); + _exit(EXIT_SUCCESS); } out: close(pip[1]); diff --git a/shell/ash_test/printenv.c b/shell/ash_test/printenv.c index 06df21f..c4ccda8 100644 --- a/shell/ash_test/printenv.c +++ b/shell/ash_test/printenv.c @@ -45,7 +45,7 @@ main (argc, argv) { for (envp = environ; *envp; envp++) puts (*envp); - exit (0); + exit(EXIT_SUCCESS); } /* printenv varname */ @@ -59,9 +59,9 @@ main (argc, argv) if (*eval == '=') { puts (eval + 1); - exit (0); + exit(EXIT_SUCCESS); } } } - exit (1); + exit(EXIT_FAILURE); } diff --git a/shell/ash_test/recho.c b/shell/ash_test/recho.c index 02be0d7..fb48d9c 100644 --- a/shell/ash_test/recho.c +++ b/shell/ash_test/recho.c @@ -41,7 +41,7 @@ char **argv; strprint(argv[i]); printf(">\n"); } - exit(0); + exit(EXIT_SUCCESS); } void diff --git a/shell/ash_test/zecho.c b/shell/ash_test/zecho.c index 621d06d..bf876f6 100644 --- a/shell/ash_test/zecho.c +++ b/shell/ash_test/zecho.c @@ -35,5 +35,5 @@ char **argv; } putchar('\n'); - exit(0); + exit(EXIT_SUCCESS); } diff --git a/shell/bbsh.c b/shell/bbsh.c index 02e6050..5386bb0 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c @@ -168,7 +168,7 @@ static int run_pipeline(struct pipeline *line) run_applet_and_exit(cmd->argv[0],cmd->argc,cmd->argv); execvp(cmd->argv[0],cmd->argv); printf("No %s",cmd->argv[0]); - exit(1); + exit(EXIT_FAILURE); } else waitpid(pid, &status, 0); } diff --git a/shell/hush.c b/shell/hush.c index aa740f1..26d113b 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -1480,7 +1480,7 @@ static void pseudo_exec_argv(char **argv) debug_printf_exec("execing '%s'\n", argv[0]); execvp(argv[0], argv); bb_perror_msg("cannot exec '%s'", argv[0]); - _exit(1); + _exit(EXIT_FAILURE); } /* Called after [v]fork() in run_pipe() diff --git a/shell/msh.c b/shell/msh.c index aa6fb1d..48fa56e 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -2855,7 +2855,7 @@ static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp) if (t->op_type == TPAREN) _exit(execute(t->left, NOPIPE, NOPIPE, /* no_fork: */ 1)); if (wp[0] == NULL) - _exit(0); + _exit(EXIT_SUCCESS); cp = rexecve(wp[0], wp, makenv(0, NULL)); prs(wp[0]); @@ -4207,7 +4207,7 @@ static int grave(int quoted) prs(argument_list[0]); prs(": "); err(cp); - _exit(1); + _exit(EXIT_FAILURE); } @@ -4733,7 +4733,7 @@ static int filechar(struct ioarg *ap) while (size == 0 || position >= size) { size = read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state); if (size < 0) /* Error/EOF */ - exit(0); + exit(EXIT_SUCCESS); position = 0; /* if Ctrl-C, size == 0 and loop will repeat */ } @@ -5212,7 +5212,7 @@ int msh_main(int argc, char **argv) name = *++argv; if (newfile(name)) - exit(1); /* Exit on error */ + exit(EXIT_FAILURE); /* Exit on error */ } } |