qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] replay: fix replay shutdown for console mode


From: Pavel Dovgalyuk
Subject: Re: [PATCH] replay: fix replay shutdown for console mode
Date: Mon, 1 Jun 2020 13:36:02 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

ping

On 22.05.2020 09:45, Pavel Dovgalyuk wrote:
When QEMU is used without any graphical window,
QEMU execution is terminated with the signal (e.g., Ctrl-C).
Signal processing in QEMU does not include
qemu_system_shutdown_request call. That is why shutdown
event is not recorded by record/replay in this case.
This patch adds shutdown event to the end of the record log.
Now every replay will shutdown the machine at the end.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
---
  0 files changed

diff --git a/replay/replay.c b/replay/replay.c
index 53edad1377..83ed9e0e24 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -366,6 +366,11 @@ void replay_finish(void)
      /* finalize the file */
      if (replay_file) {
          if (replay_mode == REPLAY_MODE_RECORD) {
+            /*
+             * Can't do it in the signal handler, therefore
+             * add shutdown event here for the case of Ctrl-C.
+             */
+            replay_shutdown_request(SHUTDOWN_CAUSE_HOST_SIGNAL);
              /* write end event */
              replay_put_event(EVENT_END);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]