[Top][All Lists]

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

Re: [bug #33134] spurious error when stdout is already closed

From: Philip Guenther
Subject: Re: [bug #33134] spurious error when stdout is already closed
Date: Wed, 20 Apr 2011 21:00:20 -0700

On Wed, Apr 20, 2011 at 7:36 PM, David Boyce <address@hidden> wrote:
> On Wed, Apr 20, 2011 at 9:58 PM, Philip Guenther <address@hidden> wrote:
>> Could you explain why you think that's spurious?  Make wanted to write
>> "date" to stdout and the write failed.  Seems legit to me.
> Basically in a (sensible and nicely documented) attempt to detect all
> errors, make does an explicit close of stdout just before exiting in
> order to make one last check for failure modes. However, it makes the
> mistake of assuming stdout was open to start with.

Why is that a mistake?

It appears you're saying that make should complain about failures to
write to stdout for reasons like EIO, ENOSPC,  and EOVERFLOW, but
*not* for EBADF.  Does the POSIX standard specify that that error
should be handled differently by make?

(Actually, your patch doesn't just ignore EBADF errors: it ignores
EPIPE errors, as the ftell() will fail on the pipe.  Why is that a
good idea?)

Philip Guenther

reply via email to

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