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"?)
Mike Stone
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]