[ping] Re: fix stderr, fdopen
Jeff Johnston
jjohnstn@redhat.com
Tue Jul 31 21:46:00 GMT 2007
Ok to commit.
-- Jeff J.
Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Eric Blake on 7/13/2007 9:02 PM:
>> POSIX requires "The stderr stream is expected to be open for reading and
>> writing". This implements that (and if fd 2 is a write-only pipe instead
>> of a read-write tty, fgetc(stderr) will correctly fail later on); ok to
>> apply?
>>
>> Also, for fdopen, POSIX states "Although not explicitly required by this
>> volume of IEEE Std 1003.1-2001, a good implementation of append (a) mode
>> would cause the O_APPEND flag to be set." OK to apply?
>>
>> 2007-07-13 Eric Blake <ebb9@byu.net>
>>
>> More POSIX stream corner cases.
>> * libc/stdio/findfp.c (__sinit): Open stderr read/write.
>> * libc/stdio/fdopen.c (_fdopen_r): Set O_APPEND on fd when
>> requested.
>> * libc/stdio64/fdopen64.c (_fdopen64_r): Likewise.
>>
>
> ping
>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake ebb9@byu.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGreQt84KuGfSFAYARAla1AKC2b/UwY3HWBnJ4Q2i+qu8b12ZMTQCfcr2K
> fT6Xjeq3DORrSYdlCE19W4s=
> =DI9Z
> -----END PGP SIGNATURE-----
More information about the Newlib
mailing list