bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module 'dup3'


From: Eric Blake
Subject: Re: new module 'dup3'
Date: Sun, 23 Aug 2009 16:58:43 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

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

According to Bruno Haible on 8/23/2009 4:17 PM:
> This implements the 'dup3' replacement function.
> 
> Paolo's issue of use of older Linux kernels is not yet handled.

Looks good.

> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
> /* Native Woe32 API.  */
> 
>   if (flags & O_CLOEXEC)
>     {
...
>     }
> 
>   if (dup2 (oldfd, newfd) < 0)
>     return -1;

In the case where oldfd was previously marked O_NOINHERIT, dup2() on mingw
appears to create newfd as O_NOINHERIT as well.  I think we have to rework
this patch to use DuplicateHandle/_open_osfhandle on both control paths.

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

Eric Blake             address@hidden
-----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/

iEYEARECAAYFAkqRyaMACgkQ84KuGfSFAYD04ACgtPuvd5z1sPxV7fvpXooJ5+5Q
jsIAoKkOwf/d5IshB71WvMUlTCddqJTJ
=Cegd
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]