-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logger.c: Fix deadlocks due to blocked writes.
When a large amount of data is being logged, libc_write will get stuck because the file descriptors for remote console logging are blocking. We now make them nonblocking whenever we write to them, and this resolves that issue. Granted, we may lose some messages on remote consoles by doing this, but if that's happening, there's likely another bug triggering an avalanche of log messages that needs investigating. Other related improvements that improve dealing with large amounts of I/O: * bbs_write can fail to write all of the bytes. We retry this in a loop (as we should), but instead of a tight loop or an arbitrarily less tight loop, use the POLLOUT event to time the write optimally. * If a pseudoterminal write operation returns -1, shut down the PTY. Fixes #13
- Loading branch information
1 parent
5061c7c
commit 1527168
Showing
4 changed files
with
39 additions
and
10 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
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