fhandler_socket::dup

Pierre A. Humblet Pierre.Humblet@ieee.org
Wed Mar 12 14:37:00 GMT 2003


Corinna Vinschen wrote:
> 
> On Wed, Mar 12, 2003 at 12:57:20AM -0500, Christopher Faylor wrote:
> > On Wed, Mar 12, 2003 at 12:15:25AM -0500, Pierre A. Humblet wrote:
> > >At 04:20 PM 3/11/2003 +0100, Corinna Vinschen wrote:
> > >
> > >>> > I'm seriously concidering to remove all the fixup_before/fixup_after
> > >>> > from fhandler_socket::dup() and just call fhandler_base::dup() on
> > >>> > NT systems.
> > >
> > >Corinna,
> > >
> > >I like that and I have pushed the logic to also do it on Win9X, without
> > >apparent bad effects. I just delivered 140 e-mails from a WinME to an exim
> > >server on Win98, ran inetd, ssh, etc... I also tried duping a socket after a
> > >fork, it worked fine.
> >
> > I think it doesn't work fine on Windows 95, IIRC.
> 
> I search email archives and MSDN again and it is possible that I used
> the same fixup_before/fixup_after technique in dup for... well, symmetry.
> All errors mentioned in KB on sockets are actually related to sockets
> duplicated between processes.  Win95 wasn't related, AFAIR, since it
> didn't even have WinSock2 installed by default.

Corinna, 

I agree 100% with your assessment above.
I don't see any indication that there is any more danger to use 
DuplicateHandle with WinSock2 on Win9X than on NT.
Cygwin strives to use uniform mechanisms on all platforms, so why not here,
if only to keep the code simple and straightforward, and more maintainable?
Any modification involves some risk, and that's why we test as much as 
we can.

Pierre



More information about the Cygwin-patches mailing list