Disable stdout buffering for qbt-nox

The messages printed out via stdout is usually important and short so
there is no reason to buffer them.

Closes #19984.
PR #20018.
This commit is contained in:
Chocobo1 2023-11-26 15:36:50 +08:00 committed by Vladimir Golovnev (glassez)
parent c1b63372f1
commit 3f6ca64d9e
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7

View file

@ -99,6 +99,10 @@ void adjustFileDescriptorLimit();
// Main // Main
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#ifdef DISABLE_GUI
setvbuf(stdout, nullptr, _IONBF, 0);
#endif
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
adjustFileDescriptorLimit(); adjustFileDescriptorLimit();
#endif #endif