From: Helge Deller <[email protected]> Qemu user mode does not properly flushes error messages related to bad arguments when exiting (at least when the output is piped to a file instead of running on a terminal). Ensure that we always flush by using exit() instead of _exit().
Reported by: Tobias Bergkvist Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2544 Signed-off-by: Helge Deller <[email protected]> (cherry picked from commit 9e7734ead149d73f1d25f61d0b7f075d4b2cb07d) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/linux-user/main.c b/linux-user/main.c index db99160d2d..39ac98a74a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -786,7 +786,7 @@ int main(int argc, char **argv, char **envp) execfd = open(exec_path, O_RDONLY); if (execfd < 0) { printf("Error while loading %s: %s\n", exec_path, strerror(errno)); - _exit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } -- 2.47.3
