The problem Output not being output when redirecting output to a file The cause When stdout points to a file, it gets buffered by libc into a 4k buffer Terminal output is line buffered, stderr is always unbuffered The fix