]> git.proxmox.com Git - mirror_qemu.git/commitdiff
progress: Show current progress on SIGINFO
authorMax Reitz <mreitz@redhat.com>
Tue, 7 Feb 2017 23:57:57 +0000 (00:57 +0100)
committerMax Reitz <mreitz@redhat.com>
Fri, 28 Apr 2017 16:48:11 +0000 (18:48 +0200)
Currently we only print progress information on retrieval of SIGUSR1.
Some systems have a dedicated SIGINFO for this, however, so it should be
handled appropriately if it is available.

Buglink: https://bugs.launchpad.net/qemu/+bug/1662468
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170207235757.2026-1-mreitz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
qemu-img.texi
util/qemu-progress.c

index 8c573ae0109322a401bc5f9d33feb516871668d0..50a2364e80e41ac223c68c6f483abe6e87103794 100644 (file)
@@ -84,7 +84,8 @@ with or without a command shows help and lists the supported formats
 @item -p
 display progress bar (compare, convert and rebase commands only).
 If the @var{-p} option is not used for a command that supports it, the
-progress is reported when the process receives a @code{SIGUSR1} signal.
+progress is reported when the process receives a @code{SIGUSR1} or
+@code{SIGINFO} signal.
 @item -q
 Quiet mode - do not print any output (except errors). There's no progress bar
 in case both @var{-q} and @var{-p} options are used.
index f745233763aa8417ebf7599e6c2ca50271d60db1..3c2223c1a21cd3173fe86cf96e44fce3e3bb9299 100644 (file)
@@ -88,6 +88,9 @@ static void progress_dummy_init(void)
     action.sa_handler = sigusr_print;
     action.sa_flags = 0;
     sigaction(SIGUSR1, &action, NULL);
+#ifdef SIGINFO
+    sigaction(SIGINFO, &action, NULL);
+#endif
 
     /*
      * SIGUSR1 is SIG_IPI and gets blocked in qemu_init_main_loop(). In the