forked from containers/crun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: fix a hang if there are no reads from the tty
avoid a "crun exec" hang when the the other end of the terminal stopped reading. That happened because `copy_fd_to_fd` tried to write everything that it has received from the source fd, so it would hang the current process. Prevent that using non blocking file descriptors and using epoll to detect when the file descriptor is available for write. Fixes: https://issues.redhat.com/browse/OCPBUGS-45632 Signed-off-by: Giuseppe Scrivano <[email protected]>
- Loading branch information
Showing
3 changed files
with
201 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters