This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] RE: Testsuite problem


Pétur Runólfsson <peturr02@ru.is> writes:

> Zack Weinberg wrote:
>> That is logical, but I don't think it conforms with what the code
>> does.  Specifically, if close calls write and write returns an error,
>> I think close returns successfully anyway. Now, that might itself be a
>> bug, or I might've gotten confused with the maze of template functions
>> all calling each other.
>
> Well, when I tried replacing the call to close with a direct call to
> write (see the attached file), write succeeded when the fifo was
> opened with (ios_base::in | ios_base::out), but failed with
> "Broken Pipe" when the fifo was opened with ios_base::out only.

Oh, yuck, you're right.  In that case the only way to make this test
reliably test what it's supposed to, will be to introduce a .fdopen()
extension method so that we can provide exactly the right flags to the
open() system call.  Which I suspect there's user demand for, anyway,
but it's a 3.5-only thing.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]