This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 5/6] Remove miscellaneous debris from libio.


On Mon, Feb 19, 2018 at 12:01 PM, Florian Weimer <fweimer@redhat.com> wrote:
> On 02/11/2018 05:35 PM, Zack Weinberg wrote:
>> +/* Does not actually test that stream was created by popen(). Instead,
>> +   it depends on the filebuf::sys_close() virtual to Do The Right Thing.
>> */
>
> It doesn't look very informative and completely up-to-date to me.  But I
> don't think it's a good use of our time to dwell on this.

I think it's useful to remark that POSIX doesn't require us to check
that a stream passed to pclose was created by popen (or that a stream
passed to fclose was created by fopen).  I changed the comment to say
that, and to refer to _IO_SYSCLOSE instead of "the filebuf::sys_close
virtual".

> Do fclose and pclose have to have different addresses?  We could make them
> aliases.

I don't know how to find out the answer to this question.  We do make
fputc and putc have the same address...

zw


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