diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-10 23:03:30 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-10 23:03:30 +0000 |
commit | 80d14beae9ebe64d3be1e6c2771f292977cf6d2c (patch) | |
tree | d0dd803ca8b6c70521895fd5ec71ef532861b8e4 /libbb/vfork_daemon_rexec.c | |
parent | 89054964443b5cb14cba673b86306f534810404a (diff) | |
download | busybox-w32-80d14beae9ebe64d3be1e6c2771f292977cf6d2c.tar.gz busybox-w32-80d14beae9ebe64d3be1e6c2771f292977cf6d2c.tar.bz2 busybox-w32-80d14beae9ebe64d3be1e6c2771f292977cf6d2c.zip |
Rename two config options:
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE
FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS
Make SH_STANDALONE depend on PREFER_APPLETS.
getopt.c: more randomconfig-induced fixes
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index cf88a2b28..214b645c5 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
@@ -102,7 +102,7 @@ int wait_pid(int *wstat, int pid) | |||
102 | 102 | ||
103 | int spawn_and_wait(char **argv) | 103 | int spawn_and_wait(char **argv) |
104 | { | 104 | { |
105 | #if ENABLE_FEATURE_EXEC_PREFER_APPLETS | 105 | #if ENABLE_FEATURE_PREFER_APPLETS |
106 | int rc; | 106 | int rc; |
107 | const struct bb_applet *a = find_applet_by_name(argv[0]); | 107 | const struct bb_applet *a = find_applet_by_name(argv[0]); |
108 | 108 | ||
@@ -121,8 +121,13 @@ int spawn_and_wait(char **argv) | |||
121 | { | 121 | { |
122 | int old_sleep = die_sleep; | 122 | int old_sleep = die_sleep; |
123 | int old_x = xfunc_error_retval; | 123 | int old_x = xfunc_error_retval; |
124 | die_sleep = -1; /* special flag */ | 124 | uint32_t old_m = option_mask32; |
125 | /* xfunc_die() checks for it */ | 125 | |
126 | xfunc_error_retval = EXIT_FAILURE; | ||
127 | /* special flag for xfunc_die(). If xfunc will "die" | ||
128 | * in NOFORK applet, xfunc_die() sees negative | ||
129 | * die_sleep and longjmp here instead. */ | ||
130 | die_sleep = -1; | ||
126 | 131 | ||
127 | rc = setjmp(die_jmp); | 132 | rc = setjmp(die_jmp); |
128 | if (!rc) { | 133 | if (!rc) { |
@@ -144,6 +149,7 @@ int spawn_and_wait(char **argv) | |||
144 | 149 | ||
145 | die_sleep = old_sleep; | 150 | die_sleep = old_sleep; |
146 | xfunc_error_retval = old_x; | 151 | xfunc_error_retval = old_x; |
152 | option_mask32 = old_m; | ||
147 | return rc; | 153 | return rc; |
148 | } | 154 | } |
149 | #ifndef BB_NOMMU /* MMU only */ | 155 | #ifndef BB_NOMMU /* MMU only */ |
@@ -159,7 +165,7 @@ int spawn_and_wait(char **argv) | |||
159 | rc = spawn(argv); | 165 | rc = spawn(argv); |
160 | w: | 166 | w: |
161 | return wait4pid(rc); | 167 | return wait4pid(rc); |
162 | #else /* !FEATURE_EXEC_PREFER_APPLETS */ | 168 | #else /* !FEATURE_PREFER_APPLETS */ |
163 | return wait4pid(spawn(argv)); | 169 | return wait4pid(spawn(argv)); |
164 | #endif | 170 | #endif |
165 | } | 171 | } |