aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
-rw-r--r--shell/ash_test/printenv.c6
-rw-r--r--shell/ash_test/recho.c2
-rw-r--r--shell/ash_test/zecho.c2
-rw-r--r--shell/bbsh.c2
-rw-r--r--shell/hush.c2
-rw-r--r--shell/msh.c8
7 files changed, 12 insertions, 12 deletions
diff --git a/shell/ash.c b/shell/ash.c
index b45229ba5..fa063bf20 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4789,7 +4789,7 @@ openhere(union node *redir)
4789 full_write(pip[1], redir->nhere.doc->narg.text, len); 4789 full_write(pip[1], redir->nhere.doc->narg.text, len);
4790 else 4790 else
4791 expandhere(redir->nhere.doc, pip[1]); 4791 expandhere(redir->nhere.doc, pip[1]);
4792 _exit(0); 4792 _exit(EXIT_SUCCESS);
4793 } 4793 }
4794 out: 4794 out:
4795 close(pip[1]); 4795 close(pip[1]);
diff --git a/shell/ash_test/printenv.c b/shell/ash_test/printenv.c
index 06df21fdc..c4ccda8a6 100644
--- a/shell/ash_test/printenv.c
+++ b/shell/ash_test/printenv.c
@@ -45,7 +45,7 @@ main (argc, argv)
45 { 45 {
46 for (envp = environ; *envp; envp++) 46 for (envp = environ; *envp; envp++)
47 puts (*envp); 47 puts (*envp);
48 exit (0); 48 exit(EXIT_SUCCESS);
49 } 49 }
50 50
51 /* printenv varname */ 51 /* printenv varname */
@@ -59,9 +59,9 @@ main (argc, argv)
59 if (*eval == '=') 59 if (*eval == '=')
60 { 60 {
61 puts (eval + 1); 61 puts (eval + 1);
62 exit (0); 62 exit(EXIT_SUCCESS);
63 } 63 }
64 } 64 }
65 } 65 }
66 exit (1); 66 exit(EXIT_FAILURE);
67} 67}
diff --git a/shell/ash_test/recho.c b/shell/ash_test/recho.c
index 02be0d760..fb48d9c48 100644
--- a/shell/ash_test/recho.c
+++ b/shell/ash_test/recho.c
@@ -41,7 +41,7 @@ char **argv;
41 strprint(argv[i]); 41 strprint(argv[i]);
42 printf(">\n"); 42 printf(">\n");
43 } 43 }
44 exit(0); 44 exit(EXIT_SUCCESS);
45} 45}
46 46
47void 47void
diff --git a/shell/ash_test/zecho.c b/shell/ash_test/zecho.c
index 621d06d28..bf876f641 100644
--- a/shell/ash_test/zecho.c
+++ b/shell/ash_test/zecho.c
@@ -35,5 +35,5 @@ char **argv;
35 } 35 }
36 36
37 putchar('\n'); 37 putchar('\n');
38 exit(0); 38 exit(EXIT_SUCCESS);
39} 39}
diff --git a/shell/bbsh.c b/shell/bbsh.c
index 02e60508f..5386bb097 100644
--- a/shell/bbsh.c
+++ b/shell/bbsh.c
@@ -168,7 +168,7 @@ static int run_pipeline(struct pipeline *line)
168 run_applet_and_exit(cmd->argv[0],cmd->argc,cmd->argv); 168 run_applet_and_exit(cmd->argv[0],cmd->argc,cmd->argv);
169 execvp(cmd->argv[0],cmd->argv); 169 execvp(cmd->argv[0],cmd->argv);
170 printf("No %s",cmd->argv[0]); 170 printf("No %s",cmd->argv[0]);
171 exit(1); 171 exit(EXIT_FAILURE);
172 } else waitpid(pid, &status, 0); 172 } else waitpid(pid, &status, 0);
173 } 173 }
174 174
diff --git a/shell/hush.c b/shell/hush.c
index aa740f1b4..26d113b17 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1480,7 +1480,7 @@ static void pseudo_exec_argv(char **argv)
1480 debug_printf_exec("execing '%s'\n", argv[0]); 1480 debug_printf_exec("execing '%s'\n", argv[0]);
1481 execvp(argv[0], argv); 1481 execvp(argv[0], argv);
1482 bb_perror_msg("cannot exec '%s'", argv[0]); 1482 bb_perror_msg("cannot exec '%s'", argv[0]);
1483 _exit(1); 1483 _exit(EXIT_FAILURE);
1484} 1484}
1485 1485
1486/* Called after [v]fork() in run_pipe() 1486/* Called after [v]fork() in run_pipe()
diff --git a/shell/msh.c b/shell/msh.c
index aa6fb1d26..48fa56eb7 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)
2855 if (t->op_type == TPAREN) 2855 if (t->op_type == TPAREN)
2856 _exit(execute(t->left, NOPIPE, NOPIPE, /* no_fork: */ 1)); 2856 _exit(execute(t->left, NOPIPE, NOPIPE, /* no_fork: */ 1));
2857 if (wp[0] == NULL) 2857 if (wp[0] == NULL)
2858 _exit(0); 2858 _exit(EXIT_SUCCESS);
2859 2859
2860 cp = rexecve(wp[0], wp, makenv(0, NULL)); 2860 cp = rexecve(wp[0], wp, makenv(0, NULL));
2861 prs(wp[0]); 2861 prs(wp[0]);
@@ -4207,7 +4207,7 @@ static int grave(int quoted)
4207 prs(argument_list[0]); 4207 prs(argument_list[0]);
4208 prs(": "); 4208 prs(": ");
4209 err(cp); 4209 err(cp);
4210 _exit(1); 4210 _exit(EXIT_FAILURE);
4211} 4211}
4212 4212
4213 4213
@@ -4733,7 +4733,7 @@ static int filechar(struct ioarg *ap)
4733 while (size == 0 || position >= size) { 4733 while (size == 0 || position >= size) {
4734 size = read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state); 4734 size = read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state);
4735 if (size < 0) /* Error/EOF */ 4735 if (size < 0) /* Error/EOF */
4736 exit(0); 4736 exit(EXIT_SUCCESS);
4737 position = 0; 4737 position = 0;
4738 /* if Ctrl-C, size == 0 and loop will repeat */ 4738 /* if Ctrl-C, size == 0 and loop will repeat */
4739 } 4739 }
@@ -5212,7 +5212,7 @@ int msh_main(int argc, char **argv)
5212 5212
5213 name = *++argv; 5213 name = *++argv;
5214 if (newfile(name)) 5214 if (newfile(name))
5215 exit(1); /* Exit on error */ 5215 exit(EXIT_FAILURE); /* Exit on error */
5216 } 5216 }
5217 } 5217 }
5218 5218