[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] hang on Win32/MinGW with sync file:
From: |
Matthew Gregan |
Subject: |
Re: [Monotone-devel] hang on Win32/MinGW with sync file: |
Date: |
Wed, 5 Dec 2007 09:11:45 +1300 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
At 2007-12-04T06:52:46-0500, Stephen Leake wrote:
> 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.
Yep. It'll end up looking very much like the existing code for non-Windows
platforms.
> 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?
Right, that code is an implementation of socketpair() for Windows because it
is not provided by the Windows socket API. Cross platform refers to the
rest of the code--all platforms can use socketpair() and almost all of the
rest of the code can be shared between platforms (except for process
creation, but we probably already have sufficient wrappers for these in the
$platform/ directories already).
> 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.
We try to keep as much code as possible cross platform. I'd prefer to keep
the code shared in the top level netxx_pipe.cc and just have any OS-specific
wrappers pushed down into the $platform/ directories. In this case, that
would be the dumb_socketpair code and possibly some extension to our
existing process creation code.
> 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'd prefer to ask Nathan about the license and then include the file
directly. The Win32 specific code can go in win32/socketpair.c. The unix/
implementation can just call the real socketpair() directly like the !WIN32
case in socketpair.c does.
> I assume this should be done on a branch;
> n.v.m.experimental.win32_pipes ?
It can be--branches are free, after all.
Cheers,
-mjg
--
Matthew Gregan |/
/| address@hidden
- [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/02
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/03
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Matthew Gregan, 2007/12/03
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/03
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Nathaniel Smith, 2007/12/03
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Matthew Gregan, 2007/12/03
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Nathaniel Smith, 2007/12/03
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:,
Matthew Gregan <=
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Zack Weinberg, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Matthew Gregan, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Zack Weinberg, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Zack Weinberg, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Matthew Gregan, 2007/12/04
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/05
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/09
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/09
- Re: [Monotone-devel] hang on Win32/MinGW with sync file:, Stephen Leake, 2007/12/09