mirror of
https://github.com/sheumann/hush.git
synced 2024-06-30 11:29:32 +00:00
Changes so that hush can successfully re-execute itself:
*initialize the "environ" variable *Reduce the stack size to 8192 (This should still be further reduced based on analysis of usage.)
This commit is contained in:
parent
8f7e30fc8b
commit
c8de71ae9d
2
Makefile
2
Makefile
|
@ -98,7 +98,7 @@ DEFINES += -DF_SETFD=-1 -DFD_CLOEXEC=-1
|
||||||
# Optimize bit 6 breaks some standard-compliant varargs code,
|
# Optimize bit 6 breaks some standard-compliant varargs code,
|
||||||
# and bits 0, 4, and 5 have known bugs. Disable for now.
|
# and bits 0, 4, and 5 have known bugs. Disable for now.
|
||||||
CFLAGS = -i -w -a0 -O8
|
CFLAGS = -i -w -a0 -O8
|
||||||
STACKSIZE = 20480
|
STACKSIZE = 8192
|
||||||
|
|
||||||
.IF $(DEBUG)
|
.IF $(DEBUG)
|
||||||
CFLAGS += -g -DDEBUG
|
CFLAGS += -g -DDEBUG
|
||||||
|
|
|
@ -8034,6 +8034,9 @@ int hush_main(int argc, char **argv)
|
||||||
|
|
||||||
INIT_G();
|
INIT_G();
|
||||||
hush_exec_path = get_exec_path();
|
hush_exec_path = get_exec_path();
|
||||||
|
#ifdef __GNO__
|
||||||
|
environInit();
|
||||||
|
#endif
|
||||||
if (EXIT_SUCCESS != 0) /* if EXIT_SUCCESS == 0, it is already done */
|
if (EXIT_SUCCESS != 0) /* if EXIT_SUCCESS == 0, it is already done */
|
||||||
G.last_exitcode = EXIT_SUCCESS;
|
G.last_exitcode = EXIT_SUCCESS;
|
||||||
#if ENABLE_HUSH_FAST
|
#if ENABLE_HUSH_FAST
|
||||||
|
|
Loading…
Reference in New Issue
Block a user