[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 47/93] qemu-progress: Fix progress printing on SIGUSR
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 47/93] qemu-progress: Fix progress printing on SIGUSR1 |
Date: |
Fri, 24 Jan 2014 18:21:30 +0100 |
Since commit a7aae221 ('Switch SIG_IPI to SIGUSR1'), SIGUSR1 is blocked
during startup, breaking the progress report in tools.
This patch reenables the signal when initialising a progress report.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
---
util/qemu-progress.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/util/qemu-progress.c b/util/qemu-progress.c
index ad33fee..4ee5cd0 100644
--- a/util/qemu-progress.c
+++ b/util/qemu-progress.c
@@ -82,12 +82,22 @@ static void progress_dummy_init(void)
{
#ifdef CONFIG_POSIX
struct sigaction action;
+ sigset_t set;
memset(&action, 0, sizeof(action));
sigfillset(&action.sa_mask);
action.sa_handler = sigusr_print;
action.sa_flags = 0;
sigaction(SIGUSR1, &action, NULL);
+
+ /*
+ * SIGUSR1 is SIG_IPI and gets blocked in qemu_init_main_loop(). In the
+ * tools that use the progress report SIGUSR1 isn't used in this meaning
+ * and instead should print the progress, so reenable it.
+ */
+ sigemptyset(&set);
+ sigaddset(&set, SIGUSR1);
+ pthread_sigmask(SIG_UNBLOCK, &set, NULL);
#endif
state.print = progress_dummy_print;
--
1.8.1.4
- [Qemu-devel] [PULL 37/93] qemu-io: Make filename optional, (continued)
- [Qemu-devel] [PULL 37/93] qemu-io: Make filename optional, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 39/93] tests: Add test for qdict_flatten(), Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 40/93] iotests: Test new blkdebug/blkverify interface, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 38/93] tests: Add test for qdict_array_split(), Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 41/93] iotests: Test file format nesting, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 42/93] block: fix backing file segfault, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 43/93] dataplane: fix shadowed return value, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 44/93] qcow2: fix wrong value of L1E_OFFSET_MASK, L2E_OFFSET_MASK and REFT_OFFSET_MASK, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 45/93] vmdk: Check for overhead when opening, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 46/93] qemu-progress: Drop unused include, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 47/93] qemu-progress: Fix progress printing on SIGUSR1,
Kevin Wolf <=
- [Qemu-devel] [PULL 49/93] sheepdog: fix 'qemu-img map', Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 48/93] Documentation: qemu-img: Mention SIGUSR1 progress report, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 51/93] vmdk: Fix format specific information (create type) for streamOptimized, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 50/93] drive mirror:fix memory leak, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 52/93] qapi: Add "backing" to BlockStats, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 54/93] block: Allow the user to define "node-name" option both on command line and QMP., Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 53/93] block: Add bs->node_name to hold the name of a bs node of the bs graph., Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 61/93] block: resize backing file image during offline commit, if necessary, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 62/93] block: resize backing image during active layer commit, if needed, Kevin Wolf, 2014/01/24
- [Qemu-devel] [PULL 64/93] block: Fix bdrv_commit return value, Kevin Wolf, 2014/01/24