Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 035b613

Browse filesBrowse files
bnoordhuistargos
authored andcommitted
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: #28479 PR-URL: #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>
1 parent 5f9ee9f commit 035b613
Copy full SHA for 035b613

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,10 @@ void ResetStdio() {
644644
do
645645
err = tcsetattr(fd, TCSANOW, &s.termios);
646646
while (err == -1 && errno == EINTR); // NOLINT
647-
CHECK_NE(err, -1);
647+
// EIO has been observed to be returned by the Linux kernel under some
648+
// circumstances. Reading through drivers/tty/tty_io*.c, it seems to
649+
// indicate the tty went away. Of course none of this is documented.
650+
CHECK_IMPLIES(err == -1, errno == EIO);
648651
}
649652
}
650653
#endif // __POSIX__

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.