Incorrect detection of EOF with interactive editline

Abdullah <[email protected]> Thu, 18 Sep 2025 03:33:57 +0300
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
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