Skip to contentSkip to conversation

progress: Show current progress on SIGINFO

PATCH Applied Max Reitz 4 participants 7 messages Feb 7, 2017 – Apr 28, 2017

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 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.

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
util/qemu-progress.c +3 -0
index f745233763..3c2223c1a2 100644
@@ -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
qemu-img.texi +2 -1
index 174aae38b7..b7e849b22b 100644
@@ -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.
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Max Reitz

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.

Quoted 8 lines

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
author
#2 lore raw
In reply to Max Reitz
Quoted 4 lines · Max Reitz

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.

Quoted 8 lines

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Ping

author
#3 lore raw
In reply to Max Reitz
Quoted 4 lines · Max Reitz

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.

Quoted 8 lines

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Ping

(If nobody replies in the next month or so, I'm just going to merge this, as util/qemu-progress.c doesn't have a maintainer.)

#4 lore raw
Quoted 14 lines · Max Reitz
Quoted 4 lines · Max Reitz

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.

Quoted 8 lines

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Quoted 5 lines

Ping

(If nobody replies in the next month or so, I'm just going to merge this, as util/qemu-progress.c doesn't have a maintainer.)

https://www.youtube.com/watch?v=vU54c3YDyak

#5 lore raw
In reply to Max Reitz
Quoted 14 lines · Max Reitz
Quoted 4 lines · Max Reitz

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.

Quoted 8 lines

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Quoted 4 lines

Ping

(If nobody replies in the next month or so, I'm just going to merge this, as util/qemu-progress.c doesn't have a maintainer.)

qemu-img.c is the sole user, so it implicitly belongs to the block maintainers, I assume.

Actually, why not add this file under block layer section of MAINTAINERS?

Fam

author Applied
#6 lore raw
In reply to Max Reitz
Quoted 4 lines · Max Reitz

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.

Quoted 8 lines

---
Can anyone test this on a BSD system? O:-)

---
 util/qemu-progress.c | 3 +++
 qemu-img.texi        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Applied to my block branch.

(https://github.com/XanClic/qemu/commits/block)

Max