Skip to content

Commit

Permalink
Disable stdout buffering for qbt-nox
Browse files Browse the repository at this point in the history
The messages printed out via stdout is usually important and short so
there is no reason to buffer them.

Closes #19984.
PR #20018.
  • Loading branch information
Chocobo1 authored Nov 26, 2023
1 parent 9fde563 commit c165131
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ void adjustFileDescriptorLimit();
// Main
int main(int argc, char *argv[])
{
#ifdef DISABLE_GUI
setvbuf(stdout, nullptr, _IONBF, 0);
#endif

#ifdef Q_OS_UNIX
adjustFileDescriptorLimit();
#endif
Expand Down

0 comments on commit c165131

Please sign in to comment.