diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2018-10-10 11:17:58 +0100 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2018-10-10 11:17:58 +0100 |
commit | 0d3a786b7cff90868a586e5e3a491b82589a236d (patch) | |
tree | 80a33e6551153c3ec43e15bdac7aca33c896d560 /Src/init.c | |
parent | 46c448cf9b31f1d6bc3fdd86953550417cc78c75 (diff) | |
download | zsh-0d3a786b7cff90868a586e5e3a491b82589a236d.tar.gz zsh-0d3a786b7cff90868a586e5e3a491b82589a236d.tar.xz zsh-0d3a786b7cff90868a586e5e3a491b82589a236d.zip |
43669: ensure explicit exit status is used over implicit
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c index 838c2c2d1..cec914329 100644 --- a/Src/init.c +++ b/Src/init.c @@ -1358,7 +1358,7 @@ init_misc(char *cmd, char *zsh_name) bshin = fdopen(SHIN, "r"); execstring(cmd, 0, 1, "cmdarg"); stopmsg = 1; - zexit(exit_val ? exit_val : lastval, 0); + zexit((exit_pending || shell_exiting) ? exit_val : lastval, 0); } if (interact && isset(RCS)) |