Merge pull request #93 from larsks/bug/92

Disable line buffering in stdout
This commit is contained in:
Martin Lund 2021-01-18 01:09:35 +01:00 committed by GitHub
commit 354bd6e185
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -286,6 +286,10 @@ void stdout_configure(void)
{ {
int status; int status;
/* Disable line buffering in stdout. This is necessary if we
* want things like local echo to work correctly. */
setbuf(stdout, NULL);
/* Save current stdout settings */ /* Save current stdout settings */
if (tcgetattr(STDOUT_FILENO, &stdout_old) < 0) if (tcgetattr(STDOUT_FILENO, &stdout_old) < 0)
{ {