]> git.ipfire.org Git - thirdparty/util-linux.git/commit
more: temporarily ignore stdin when waiting for stderr
authorKarel Zak <kzak@redhat.com>
Mon, 30 Jun 2025 10:20:13 +0000 (12:20 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 30 Jun 2025 10:20:13 +0000 (12:20 +0200)
commit85cbb5f5449be75d51b064681f0d92adf31f59be
tree49af2a1de9fdb8a5899d170f458d21933cca0f7f
parent5a8c5975fda07c45a78985fe5f38f1f304c79b25
more: temporarily ignore stdin when waiting for stderr

more waits for user commands on stderr, but at the same time, it
monitors sigalfd and stdin (for data and POLLHUP|POLLNVAL). We need to
temporarily ignore stdin if there is new data waiting for read()
(e.g., dmesg | more); otherwise, more_key_command() will end in a busy
loop.

Fixes: https://github.com/util-linux/util-linux/issues/3634
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/more.c