diff options
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index 27fab0d1b..72186f970 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1902,7 +1902,7 @@ static int run_pipe(struct pipe *pi) | |||
1902 | #endif | 1902 | #endif |
1903 | if (child->pid < 0) { /* [v]fork failed */ | 1903 | if (child->pid < 0) { /* [v]fork failed */ |
1904 | /* Clearly indicate, was it fork or vfork */ | 1904 | /* Clearly indicate, was it fork or vfork */ |
1905 | bb_perror_msg(BB_MMU ? "vfork" + 1 : "vfork"); | 1905 | bb_perror_msg(BB_MMU ? "fork" : "vfork"); |
1906 | } else { | 1906 | } else { |
1907 | pi->alive_progs++; | 1907 | pi->alive_progs++; |
1908 | #if ENABLE_HUSH_JOB | 1908 | #if ENABLE_HUSH_JOB |
@@ -3096,7 +3096,9 @@ static FILE *generate_stream_from_list(struct pipe *head) | |||
3096 | * huge=`cat TESTFILE` # will block here forever | 3096 | * huge=`cat TESTFILE` # will block here forever |
3097 | * echo OK | 3097 | * echo OK |
3098 | */ | 3098 | */ |
3099 | pid = BB_MMU ? xfork() : xvfork(); | 3099 | pid = BB_MMU ? fork() : vfork(); |
3100 | if (pid < 0) | ||
3101 | bb_perror_msg_and_die(BB_MMU ? "fork" : "vfork"); | ||
3100 | if (pid == 0) { /* child */ | 3102 | if (pid == 0) { /* child */ |
3101 | if (ENABLE_HUSH_JOB) | 3103 | if (ENABLE_HUSH_JOB) |
3102 | die_sleep = 0; /* let nofork's xfuncs die */ | 3104 | die_sleep = 0; /* let nofork's xfuncs die */ |