fflush(stdout) after each line of output for pipes

This commit is contained in:
Juhani Krekelä 2019-07-04 00:32:30 +03:00
parent f9ee82b535
commit 489637433a
1 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,10 @@ int main(int argc, char **argv) {
err(1, "printf");
}
}
if (fflush(stdout) == -1) {
err(1, "fflush");
}
}
return 0;