diff --git a/shell/hush.c b/shell/hush.c index 21590adfb..db99cc908 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -5587,6 +5587,13 @@ int hush_main(int argc, char **argv) G.PS2 = "> "; #endif + if (setjmp(die_jmp)) { + /* xfunc has failed! die die die */ + /* no EXIT traps, this is an escape hatch! */ + G.exiting = 1; + hush_exit(xfunc_error_retval); + } + /* Shell is non-interactive at first. We need to call * block_signals(0) if we are going to execute "sh