diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2026-05-13 11:24:24 +0200 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2026-05-16 18:28:32 +0200 |
| commit | 78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92 (patch) | |
| tree | 4f467ab3ca8c1a7ddaf6442e9f2e07b014d1c6ca /Src | |
| parent | 54569: zle: various issues (diff) | |
| download | zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.tar zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.tar.gz zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.tar.bz2 zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.tar.lz zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.tar.xz zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.tar.zst zsh-78c3e89dfbd482cfcc6ccba4c73bbd97fd150b92.zip | |
54525: interrupt during redirect to fifo doesn't run precmd
Even though we clear errflag here, there can be a queued signal that
will run when we try to execute precmd and that will set errflag again,
aborting precmd after all. Let the signals through here instead.
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c index 7c3b82461..a422036c7 100644 --- a/Src/init.c +++ b/Src/init.c @@ -127,7 +127,7 @@ loop(int toplevel, int justonce) if (isset(SHINSTDIN)) { setblock_stdin(); if (interact && toplevel) { - int hstop = stophist; + int hstop = stophist, q; stophist = 3; /* * Reset all errors including the interrupt error status @@ -136,6 +136,9 @@ loop(int toplevel, int justonce) * precaution to ensure we get back to the command line * no matter what. */ + q = queue_signal_level(); + dont_queue_signals(); + restore_queue_signals(q); errflag = 0; preprompt(); if (stophist != 3) |
