[Bug 1054502] Re: man page dd - Sending USR1 signal
Dave Gilbert
ubuntu at treblig.org
Sun Oct 7 19:22:21 UTC 2012
That example certainly isn't clear.
I don't think you need the kill -CONT, as far as I can tell the -USR1 will display the info and just carry on without
any other requirement.
So it's not obvious to me what the kill $pid in the original example is supposed to do, if you look at the info page
for dd it uses a more complex example that makes some more sense:
Sending an `INFO' signal to a running `dd' process makes it print
I/O statistics to standard error and then resume copying. In the
example below, `dd' is run in the background to copy 10 million blocks.
The `kill' command makes it output intermediate I/O statistics, and
when `dd' completes normally or is killed by the `SIGINT' signal, it
outputs the final statistics.
$ dd if=/dev/zero of=/dev/null count=10MB & pid=$!
$ kill -s INFO $pid; wait $pid
3385223+0 records in
3385223+0 records out
1733234176 bytes (1.7 GB) copied, 6.42173 seconds, 270 MB/s
10000000+0 records in
10000000+0 records out
5120000000 bytes (5.1 GB) copied, 18.913 seconds, 271 MB/s
On systems lacking the `INFO' signal `dd' responds to the `USR1'
signal instead, unless the `POSIXLY_CORRECT' environment variable is
set.
It's possible the kill $pid in the example is just there to kill off
the backgrounded dd.
Confirming because at the very least the example is confusing.
** Changed in: coreutils (Ubuntu)
Importance: Undecided => Low
** Changed in: coreutils (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1054502
Title:
man page dd - Sending USR1 signal
Status in “coreutils” package in Ubuntu:
Confirmed
Bug description:
I read this in the man page dd
Sending a USR1 signal to a running `dd' process makes it print
I/O statistics to standard error and then resume copying.
$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid
18335302+0 records in 18335302+0 records out 9387674624
bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
But when I tried 'kill -USR1 $pid; sleep 1; kill $pid', dd didn't
resume.
I correct it with
kill -USR1 $pid; sleep 1; kill -CONT $pid
I'm not sure it could be concidered as bug but the man page isn't
correct and it should be corrected
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1054502/+subscriptions
More information about the foundations-bugs
mailing list