]>
git.ipfire.org Git - thirdparty/systemd.git/commit
ptyfwd: do not try to read master if already disconnected
When PTYForward.done is set, the PTYForward.master is already
disconnected. Let's not try to read the already closed file descriptor.
Also, if we previously received vhangup, then it is not necessary to
re-read the device to check vhangup, as we already know.
This also make the check slightly delayed, and use a defer event source,
to make the function can be called safely in another event source.