public inbox for dash@vger.kernel.org
 help / color / mirror / Atom feed
* Incorrect detection of EOF with interactive editline
@ 2025-09-18  0:33 Abdullah
  2025-09-18  0:33 ` [PATCH] histedit: fix dash exiting when receiving a signal interactively Abdullah
  0 siblings, 1 reply; 4+ messages in thread
From: Abdullah @ 2025-09-18  0:33 UTC (permalink / raw)
  To: dash

When an interactive shell (with editline) has a trap signal set
(e.g., [1]) and the signal is caught AND there's nothing on the input
line, the shell (or at least editline), after executing the trap
handler, treats the empty line as EOF.

Try [1] with interactive editline, have a clean line input line,
and change the size of your term, then your shell would die.

Also, we should call el_resize on WINCH, because we have not set
the EL_SIGNAL option (and we shouldn't set EL_SIGNAL, that would mixup
with trap handlers).


[1] $ trap 'echo "WINDOW CHANGED! New size:"; stty size' WINCH

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-22  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18  0:33 Incorrect detection of EOF with interactive editline Abdullah
2025-09-18  0:33 ` [PATCH] histedit: fix dash exiting when receiving a signal interactively Abdullah
2025-09-18  3:20   ` Herbert Xu
     [not found]     ` <DCW6NI4KVK3I.1ALXRKL5V6UCM@gmail.com>
2025-09-22  3:43       ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox