bug in dup2

Eric Blake ebb9@byu.net
Tue Jul 21 12:09:00 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

POSIX requires dup2(1,1) to return 1 (if stdout is open), not 0.  I wonder
how long that bug has been present?  And the STC:

#include <unistd.h>
int main() { return dup2 (1, 1); }

2009-07-21  Eric Blake  <ebb9@byu.net>

	* dtable.cc (dup2): Correct return value for no-op.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkplr+gACgkQ84KuGfSFAYBSRwCXVTmu0J1jhB22KZLl7kVPEtL2
8QCghsc7m0X7YsfqJDEHT3NLgRu23Bs=
=W7zw
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch17
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20090721/bdd93eaf/attachment.ksh>


More information about the Cygwin-patches mailing list