bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dd and closed stderr


From: Jim Meyering
Subject: Re: dd and closed stderr
Date: Fri, 28 Aug 2009 14:50:17 +0200

Eric Blake wrote:
> Is it intentional that:
>
> echo | dd 2>&-
>
> has a 0 exit status, even though it failed to write the summary message to
> stderr?  Or is this a case where atexit(maybe_close_stdout) is
> inadvertantly forgetting about stderr when close_stdout_required is false?

Good catch!

dd is relatively unusual in that it is required
to write to stderr, even upon successful completion.
At first glance, I don't see language in the spec saying
what dd must do when writing to stderr fails.

Regardless of POSIX, what if an application requires that output and
attempts to parse it?  In that case, a successful exit status is defintely
at odds with empty stderr (which could arise also due to ENOSPC).

So I'd say it's a bug.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]