Disable stdout buffering globally

This makes it possible to pipe output to other programs cleanly.
This commit is contained in:
V 2025-03-11 13:59:45 +00:00 committed by Martin Lund
parent 6aca9ffee5
commit 7567e08227
2 changed files with 4 additions and 4 deletions

View file

@ -61,6 +61,10 @@ int main(int argc, char *argv[])
/* Configure tty device */
tty_configure();
/* Disable line buffering in stdout. This is necessary if we
* want things like local echo to work correctly. */
setvbuf(stdout, NULL, _IONBF, 0);
/* Configure input terminal */
if (isatty(fileno(stdin)))
{