From: Abdullah <3bd3bdr@gmail.com>
To: dash@vger.kernel.org
Subject: Incorrect detection of EOF with interactive editline
Date: Thu, 18 Sep 2025 03:33:57 +0300 [thread overview]
Message-ID: <20250918003435.11162-1-3bd3bdr@gmail.com> (raw)
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
next reply other threads:[~2025-09-18 0:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 0:33 Abdullah [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250918003435.11162-1-3bd3bdr@gmail.com \
--to=3bd3bdr@gmail.com \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox