Michael Stone <[EMAIL PROTECTED]> wrote:
> On Tue, Jan 29, 2008 at 01:27:57PM +0100, Jim Meyering wrote:
>>Rogier Wolff <[EMAIL PROTECTED]> wrote:
>>...
>>> Let me reiterate: It is the first "dd" that is misbehaving, when it
>>> recieves a write error and SIGPIPE, it simply exits instead of
>>> reporting the stats.
>>
>>Thanks for the report, but that behavior is required by POSIX.
>>dd must handle SIGINT the way you want, but dd may not handle
>>SIGPIPE that way:
>>
>>    ASYNCHRONOUS EVENTS
>>
>>        For SIGINT, the dd utility shall interrupt its current processing,
>>        write status information to standard error, and exit as though
>>        terminated by SIGINT. It shall take the standard action for all
>>        other signals; see the ASYNCHRONOUS EVENTS section in Section 1.4
>>        (on page 2280).
>
> I figured there'd be some piece of posix at the bottom of it. :) I
> wonder if the documentation should better reflect that. (The info page
> says only that "when dd completes it outputs the final statistics;
> maybe something like "when dd completes normally or is killed by
> SIGINT it outputs the final statistics"?)

Thanks.
I like it.

I'll do this one, but in general, it's much easier for me if such a
suggestion comes in the form of a patch created by e.g.,

  git format-patch --signoff HEAD~1

Then I can simply apply it and give proper credit with the
very convenient "git am PATCH".

Here's what I'll push:
------------------
Subject: [PATCH] Improve the description of when dd outputs its final 
statistics.

* doc/coreutils.texi (dd invocation): Say that dd prints stats
upon normal termination and upon SIGINT.

Signed-off-by: Jim Meyering <[EMAIL PROTECTED]>
---
 ChangeLog          |    6 ++++++
 doc/coreutils.texi |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 148b7d7..8415d3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-29  Michael Stone  <[EMAIL PROTECTED]>
+
+       Improve the description of when dd outputs its final statistics.
+       * doc/coreutils.texi (dd invocation): Say that dd prints stats
+       upon normal termination and upon SIGINT.
+
 2008-01-29  Jim Meyering  <[EMAIL PROTECTED]>

        Avoid "make distcheck" failure: newly-created man/*.1 files not removed
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c1300fb..fb9d5fc 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7559,7 +7559,8 @@ process makes it print I/O statistics to standard error
 and then resume copying.  In the example below,
 @command{dd} is run in the background to copy 10 million blocks.
 The @command{kill} command makes it output intermediate I/O statistics,
-and when @command{dd} completes, it outputs the final statistics.
+and when @command{dd} completes normally or is killed by the
[EMAIL PROTECTED] signal, it outputs the final statistics.

 @example
 $ dd if=/dev/zero of=/dev/null count=10MB & pid=$!
--
1.5.4.rc5.1.ge6bfe



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to