remove global "jmp_buf die_jmp" from !FEATURE_PREFER_APPLETS builds
function old new delta xfunc_has_died - 21 +21 sleep_much - 12 +12 sleep10 - 9 +9 die_func - 4 +4 fflush_stdout_and_exit 35 36 +1 builtin_type 121 119 -2 die_sleep 4 - -4 xfunc_die 60 24 -36 hush_main 1128 1011 -117 die_jmp 156 - -156 ------------------------------------------------------------------------------ (add/remove: 4/2 grow/shrink: 1/3 up/down: 47/-315) Total: -268 bytes text data bss dec hex filename 939992 992 17652 958636 ea0ac busybox_old 939880 992 17496 958368 e9fa0 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -1015,6 +1015,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void sleep_much(void)
|
||||
{
|
||||
sleep(30 * 24*60*60);
|
||||
}
|
||||
|
||||
int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int init_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
@ -1051,12 +1056,12 @@ int init_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
/* If, say, xmalloc would ever die, we don't want to oops kernel
|
||||
* by exiting.
|
||||
* NB: we set die_sleep *after* PID 1 check and bb_show_usage.
|
||||
* NB: we set die_func *after* PID 1 check and bb_show_usage.
|
||||
* Otherwise, for example, "init u" ("please rexec yourself"
|
||||
* command for sysvinit) will show help text (which isn't too bad),
|
||||
* *and sleep forever* (which is bad!)
|
||||
*/
|
||||
die_sleep = 30 * 24*60*60;
|
||||
die_func = sleep_much;
|
||||
|
||||
/* Figure out where the default console should be */
|
||||
console_init();
|
||||
|
Reference in New Issue
Block a user