OSDN Git Service

linux-user: Clean up when exiting due to a signal
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 12 Jan 2023 15:20:11 +0000 (16:20 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 16 Jan 2023 20:14:12 +0000 (10:14 -1000)
commitda91c19202420d61e3316f5a9d4c2d66bfbaff04
treefcc192681670613df4e99746388356dc6dd610ec
parentfb7e7990342e59cf67dbd895c1a1e3fb1741df7a
linux-user: Clean up when exiting due to a signal

When exiting due to an exit() syscall, qemu-user calls
preexit_cleanup(), but this is currently not the case when exiting due
to a signal. This leads to various buffers not being flushed (e.g.,
for gprof, for gcov, and for the upcoming perf support).

Add the missing call.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112152013.125680-2-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/signal.c