This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: bug in dup2
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 21 Jul 2009 15:29:14 +0200
- Subject: Re: bug in dup2
- References: <4A65AFE8.1070903@byu.net>
- Reply-to: cygwin-patches at cygwin dot com
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