bug in dup2

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Jul 21 13:29:00 GMT 2009


On Jul 21 06:09, Eric Blake wrote:
> -----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.

Applied.


Thanks for catching,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-patches mailing list