Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set line buffered mode #28

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

marshallpierce
Copy link
Contributor

When the output is not a TTY (e.g. when redirected), glibc switches from line buffering to block buffering for stdout/stderr. Rootcanal's startup log messages aren't enough to fill a block, so it would appear to just not log anything at all. Now, ./rootcanal | cat behaves as expected: log messages show up immediately.

When the output is not a TTY (e.g. when redirected), glibc switches from
line buffering to block buffering for stdout/stderr. Rootcanal's startup
log messages aren't enough to fill a block, so it would appear to just
not log anything at all. Now, `./rootcanal | cat` behaves as expected:
log messages show up immediately.
@hchataing hchataing self-requested a review March 19, 2024 20:45
@hchataing hchataing self-assigned this Mar 19, 2024
@hchataing hchataing merged commit 510c1ef into google:main Mar 19, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants