11.8.1. QEMU user mode does not show stdout immediately
At 8d8307ac0710164701f6e14c99a69ee172ccbb70 + 1, I noticed that if you run userland/posix/count.c:
./run --userland userland/posix/count_to.c --cli-args 3
it first waits for 3 seconds, then the program exits, and then it dumps all the stdout at once, instead of counting once every second as expected.
The same can be reproduced by copying the raw QEMU command and piping it through tee
, so I don’t think it is a bug in our setup:
/path/to/linux-kernel-module-cheat/out/qemu/default/x86_64-linux-user/qemu-x86_64 \ -L /path/to/linux-kernel-module-cheat/out/buildroot/build/default/x86_64/target \ /path/to/linux-kernel-module-cheat/out/userland/default/x86_64/posix/count.out \ 3 \ | tee
TODO: investigate further and then possibly post on QEMU mailing list.