]> git.ipfire.org Git - thirdparty/systemd.git/commit
ptyfwd,run: make pty_forward_drain() trigger defer event to call shovel()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 28 Jul 2025 20:13:30 +0000 (05:13 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Jul 2025 16:15:29 +0000 (01:15 +0900)
commitdce66b06880980c46896c7dbcde89491c704fed9
tree2fc19827e62e3c17b92aa2e37a095af1ff55cb59
parent446431f5c9f098d86709abfec79a2360856510e4
ptyfwd,run: make pty_forward_drain() trigger defer event to call shovel()

drained() checks PTYForward.master_readable flag, but it may be
tentatively unset due to a tentative error like EAGAIN in the previous
IO event. Let's try to call shovel() one more time, which re-read the
master and call drained() at the end. Otherwise, we may lost some data.
src/run/run.c
src/shared/ptyfwd.c
src/shared/ptyfwd.h