diff options
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Src/init.c b/Src/init.c index fad36bf0f..b987f1399 100644 --- a/Src/init.c +++ b/Src/init.c @@ -131,6 +131,15 @@ loop(int toplevel, int justonce) (tok == LEXERR && (!isset(SHINSTDIN) || !toplevel)) || justonce) break; + if (exit_pending) { + /* + * Something down there (a ZLE function?) decided + * to exit when there was stuff to clear up. + * Handle that now. + */ + stopmsg = 1; + zexit(exit_pending >> 1, 0); + } if (tok == LEXERR && !lastval) lastval = 1; continue; |