1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

man-generator: shutdown stdout buffer

Flush stdout and switch it back to line buffering before exit.
This commit is contained in:
Heinz Mauelshagen 2017-03-30 20:40:44 +02:00
parent 2c4e8254de
commit 92ac1da16a

View File

@ -3492,8 +3492,11 @@ int main(int argc, char *argv[])
}
out_free:
if (stdout_buf)
if (stdout_buf) {
fflush(stdout);
setlinebuf(stdout);
free(stdout_buf);
}
exit(r ? EXIT_SUCCESS: EXIT_FAILURE);
}