I use Eclipse. When I have an application like this:
write 20 times 'Hello World\n' to stdout
write 'ERROR\n' to stderr
write 5 times 'Hello World\n' to stdout
The output looks many times like this:
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
...
Hello World
Hello World
Hello World
ERROR
Is there a way to synchronize these two output streams? Of course without waiting a few milliseconds after the block of 20 times Hello World
and waiting a few milliseconds after printing ERROR
.