Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make stderr line-buffered for logging
qrexec_logv uses several separate fprintf() calls for a single message. Since stderr is unbuffered by default, this sometimes leads to splitting one log message with another. Avoid the issue by turning stderr into line-buffered mode. Documentation for setlinebuf() (or more precisely - for underlying setvbuf()) says it can be called only after opening the stream but before any other operation. Since setup_logging() is called as the first thing in main(), it should be okay.
- Loading branch information