Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Sent: 23 May 2003 19:45:02 GMT
Message-ID: <002301c32163$cac78c60$0200a8c0@abackusdell2>
From: "Abraham Backus" <abraham@backus.com>
To: <cygwin@cygwin.com>
References: <Pine.GSO.4.44.0304141917120.26381-100000@slinky.cs.nyu.edu> <008301c30494$3ac5ac50$0200a8c0@abackusdell2> <20030421202002.GD11137@cygbert.vinschen.de>
Subject: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22
Date: Fri, 23 May 2003 12:44:57 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

Sorry for taking awhile to respond :)

I followed Igor's suggestion and looked at the cygwin-cvs archives and found
which change is affecting me.

It seems that part of the change in:
http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00350.html

Specifically:
* fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
	using WinSock2 socket duplication methods.  Add comment.

This is what's causing me grief.

I built the 1.3.22 sources, commenting out the line:
if (! wincap.has_security ())

and my inetd apps work ok again.

I've been searching the web and archives to try and find out what's the
difference between WSADuplicateSocket and DuplicateHandle and I can't really
seem to find anything, other than an MS KB 150523 "BUG: Socket Inheritance
on Different Windows Platforms".  I don't mind investigating further, but I
think I've come to a roadblock....  In the comment with the patch, it says
"Using WinSock2 methods for dup'ing sockets seem to collide with user
context switches under... some... conditions."  Where can I find more
information on this user context collision problem?

I have WinXP Home SP1.

thanks!
-Abe

----- Original Message ----- 
From: "Corinna Vinschen" <corinna-cygwin@cygwin.com>
To: <cygwin@cygwin.com>
Sent: Monday, April 21, 2003 1:20 PM
Subject: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22


> On Wed, Apr 16, 2003 at 08:48:37PM -0700, Abraham Backus wrote:
> > Thanks Igor.  I've downloaded the cygwin cvs and am trying to track down
> > what's up in any spare time that I get.  In the meantime though, I've
copied
> > some code from a testcase for one of the patches and made some of my own
> > modifications to run it using inetd.  With 1.3.20, the code is ok.  With
> > 1.3.22 however, the calls to fgets(), fputs(), and fflush() all fail
with
> > "Socket operation on non-socket" (errno=ENOTSOCK)
>
> I've tested your below small aplication on XP using all versions from
> 1.3.20 up to current from CVS.  Actually it worked not very well on
> 1.3.20 (the both "yo" replies never made it to the client) while it
> worked nicely on all versions since 1.3.21.
>
> For the records, I used the following entry in /etc/inetd.conf:
>
>   uucp    stream  tcp     nowait  root    /home/corinna/socktest socktest
>
> I used uucp just to have some known service.  Then I connected using
> `telnet localhost uucp'.
>
> Corinna
>
> > ----- Original Message -----
> >
> > > Look in winsup/cygwin/ChangeLog between "Bump DLL minor number to 22"
and
> > > "Bump DLL minor number to 23"...  You could also look in the
cygwin-cvs
> > > list archives between 3/9 and 3/13.
> > >
> > > FWIW, I see the following socket-related changes:
> > > <http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00359.html>
> > > <http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00352.html>
> > > <http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00350.html>



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

