mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: don't abort on EIO when restoring tty
EIO has been observed to be returned by the Linux kernel under some circumstances. Reading through drivers/tty/tty_io*.c, it seems to indicate the tty went away. Of course none of this is documented. Fixes: https://github.com/nodejs/node/issues/28479 PR-URL: https://github.com/nodejs/node/pull/28490 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>
This commit is contained in:
committed by
Gus Caplan
parent
85496e94d3
commit
1095635a8a
@@ -692,7 +692,10 @@ void ResetStdio() {
|
||||
do
|
||||
err = tcsetattr(fd, TCSANOW, &s.termios);
|
||||
while (err == -1 && errno == EINTR); // NOLINT
|
||||
CHECK_NE(err, -1);
|
||||
// EIO has been observed to be returned by the Linux kernel under some
|
||||
// circumstances. Reading through drivers/tty/tty_io*.c, it seems to
|
||||
// indicate the tty went away. Of course none of this is documented.
|
||||
CHECK_IMPLIES(err == -1, errno == EIO);
|
||||
}
|
||||
}
|
||||
#endif // __POSIX__
|
||||
|
||||
Reference in New Issue
Block a user