monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] hang on Win32/MinGW with sync file:


From: Stephen Leake
Subject: Re: [Monotone-devel] hang on Win32/MinGW with sync file:
Date: Tue, 04 Dec 2007 06:52:46 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt)

Matthew Gregan <address@hidden> writes:

> At 2007-12-03T06:59:26-0500, Stephen Leake wrote:
>> I forgot to mention that this seems to be a bug in the pipe
>> implementation on Win32.
>
> Yeah, the Win32 pipe code is pretty buggy.  Rather than trying to debug it,
> I think the best solution is to toss it out, import Nathan Myers's Win32
> socketpair.c into our tree, and replace the existing pipe code with a cross
> platform implementation that uses socketpair().

I've looked at this some. I think we need to change the parts of
netxx_pipe.cc that deal with WIN32 pipes to deal with sockets
instead.

Note that dumb_socketpair is _not_ actually cross-platform; it has the
same #ifdef WIN32 style that netxx_pipe.cc currently has, and the
WIN32 version has an extra parameter that is important. Apparently
'socketpair' is implemented on some/most "unix" platforms, but not on
Win32?

I don't think there's any reason to change the non-WIN32 parts of
netxx_pipe.cc. Although we should split netxx_pipe.cc into
win32/netxx_pipe.cc, unix/netxx_pipe.cc.

So it would be cleaner to copy the dumb_socketpair implementation
idea, directly in netxx_pipe.cc, rather than using dumb_socketpair as
is. That could work around the license issue as well.

I assume this should be done on a branch;
n.v.m.experimental.win32_pipes ?

-- 
-- Stephe




reply via email to

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