提交 f1d3fb04 编写于 作者: P Peter Maydell 提交者: Aurelien Jarno

vl.c: Tidy up message printed when we exit on a signal

Tidy up the message printed when qemu exits due to a signal, so that
it's clearer where the message is coming from and that it's not just
stray debug output.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: NGleb Natapov <gleb@redhat.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 22156ab4
......@@ -1169,8 +1169,15 @@ int qemu_shutdown_requested(void)
void qemu_kill_report(void)
{
if (shutdown_signal != -1) {
fprintf(stderr, "Got signal %d from pid %d\n",
shutdown_signal, shutdown_pid);
fprintf(stderr, "qemu: terminating on signal %d", shutdown_signal);
if (shutdown_pid == 0) {
/* This happens for eg ^C at the terminal, so it's worth
* avoiding printing an odd message in that case.
*/
fputc('\n', stderr);
} else {
fprintf(stderr, " from pid %d\n", shutdown_pid);
}
shutdown_signal = -1;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册