[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 34/34] progress: Show current progress on SIGINFO
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 34/34] progress: Show current progress on SIGINFO |
Date: |
Fri, 28 Apr 2017 22:33:42 +0200 |
From: Max Reitz <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
qemu-img.texi | 3 ++-
util/qemu-progress.c | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/qemu-img.texi b/qemu-img.texi
index 8c573ae..50a2364 100644
--- a/qemu-img.texi
+++ b/qemu-img.texi
@@ -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
address@hidden 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.
diff --git a/util/qemu-progress.c b/util/qemu-progress.c
index f745233..3c2223c 100644
--- a/util/qemu-progress.c
+++ b/util/qemu-progress.c
@@ -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
--
1.8.3.1
- [Qemu-block] [PULL 24/34] block: Add errp to b{lk,drv}_truncate(), (continued)
- [Qemu-block] [PULL 24/34] block: Add errp to b{lk,drv}_truncate(), Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 27/34] qcow2: Allow discard of final unaligned cluster, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 26/34] block: Add .bdrv_truncate() error messages, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 28/34] block: fix obvious coding style mistakes in block_int.h, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 25/34] block: Add errp to BD.bdrv_truncate(), Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 29/34] block: assert no image modification under BDRV_O_INACTIVE, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 32/34] iotests: clarify help text, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 30/34] qemu-img: improve convert_iteration_sectors(), Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 31/34] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 33/34] iotests: fix exclusion option, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 34/34] progress: Show current progress on SIGINFO,
Kevin Wolf <=