qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

progress: Show current progress on SIGINFO

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>

+5 -1
+2 -1
qemu-img.texi
··· 84 84 @item -p 85 85 display progress bar (compare, convert and rebase commands only). 86 86 If the @var{-p} option is not used for a command that supports it, the 87 - progress is reported when the process receives a @code{SIGUSR1} signal. 87 + progress is reported when the process receives a @code{SIGUSR1} or 88 + @code{SIGINFO} signal. 88 89 @item -q 89 90 Quiet mode - do not print any output (except errors). There's no progress bar 90 91 in case both @var{-q} and @var{-p} options are used.
+3
util/qemu-progress.c
··· 88 88 action.sa_handler = sigusr_print; 89 89 action.sa_flags = 0; 90 90 sigaction(SIGUSR1, &action, NULL); 91 + #ifdef SIGINFO 92 + sigaction(SIGINFO, &action, NULL); 93 + #endif 91 94 92 95 /* 93 96 * SIGUSR1 is SIG_IPI and gets blocked in qemu_init_main_loop(). In the