This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: kernel patch for "Can't open display"


On Fri, Jun 22, 2001 at 03:28:23PM -0400, Christopher Faylor wrote:
> On Thu, Jun 21, 2001 at 09:30:05PM -0700, Mark wrote:
> >
> >Just so no one gets their GPL bent out of shape....  the source code to 
> >the "fix" is at: 
> >
> >http://zambezi.cs.ucdavis.edu/~mark/fhandler_socket.cc
> >
> >And as Chris said -- this is a "fix", not a patch.  As I said in my first 
> >message, one of the folks who really knows the kernel should really 
> >figure out a patch that maintains semantic correctness.
> 
> It doesn't take someone who knows the "kernel".  It requires someone who
> knows about the winsock2 api.

I just checked in a small piece of code which I assume could be a
"patch". Basically it does the same thing as before when we're
using winsock1.1 while it just skips duplicating the socket
handle when running winsock2. Sockets are not inherited
automatically in winsock2 but by calling an WSADuplicateSocket/
WSASocket pair explicitly. That means, it should be sufficient
to just set the close_on_exec flag. The `fixup_after_exec' stuff
then simply releases the corresponding fhandler. This skips
duplicating the handle (which seems to be the reason for the
"open display" problem) while it still should correctly drop the
fhandler when close_on_exec is set.

Could a few people please test the next developers snapshot (or
build from CVS themselves)?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]