[Top][All Lists]

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

Re: CVS Feature On Windows Very Broken - Windows "select" Semantics

From: Derek Price
Subject: Re: CVS Feature On Windows Very Broken - Windows "select" Semantics
Date: Tue, 27 Sep 2005 09:32:28 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Conrad T. Pino wrote:

>Unfortunately "sizeof((int)) == sizeof((SOCKET))" so telling them
>apart isn't easy.  The problem is they are seperate overlapping
>number spaces.  This program illustrates it nicely:

Two thoughts.  First, assuming that you have a single fd namespace,
which I am not sure of, then you could wrap only the open() functions
used by CVS to store an index into a private array or hash which
retained whatever information about the new file descriptor that you wished.

Secondly, I think all this determining the difference between sockets
and files is all moot - Windows handling is already so different for
sockets and files that we have to use recv() with sockets instead of
read(), which is why we were dealing with all that socket-client stuff
last week. All CVS sockets on Windows are wrapped in socket_buffers
rather than fd_buffers.  Anyhow, the select() function in
fd_buffer_input() will only ever need to tell the difference between a
pipe and a file descriptor on Windows, for that reason.



Derek R. Price
CVS Solutions Architect
Ximbiot <http://ximbiot.com>
v: +1 717.579.6168
f: +1 717.234.3125

reply via email to

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