delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/05/16:00:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <017701c0edfa$20f507b0$0100a8c0@TJC1LAPTOP>
From: "Tim Chick" <tchick AT virata DOT com>
To: "Cygwin Users" <cygwin AT cygwin DOT com>
References: <009201c0edcf$219b1a40$1201a8c0 AT winbox> <3B1CF258 DOT E41B9A09 AT yahoo DOT com> <00de01c0ede1$8eba4350$0100a8c0 AT TJC1LAPTOP>
Subject: Re: inetd under Win95 OSR2.5
Date: Tue, 5 Jun 2001 21:00:11 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

----- Original Message ----- 
From: "Tim Chick" <tchick AT virata DOT com>
To: "Cygwin Users" <cygwin AT cygwin DOT com>
Sent: Tuesday, June 05, 2001 6:04 PM
Subject: Re: inetd under Win95 OSR2.5


> I've just done some checking,at it appears that the following happens:
> 
> inetd runs telnetd
> telnetd performs a getpeername on stream 0
> 
> This call fails with the error 108 = ENOTSOCK
> 
> So I guess there is some problem with mapping STDIN to a socket
> on Win95
> 
> What else can I try? Anyone who understands this stuff have any
> ideas?
> 
> Tim

It appears that:

blah
ns = accept(...)
getpeername(ns, ...) -> Successful, and gets right answer
dup2(ns,0)
getpeername(0, ...) -> Fails with ENOTSOCK

Thats about as far as I can get with this! I looked at the cygwin
dll source, and it is way too scary :-)

My guess is either SetStdHandle does not work for sockets under Win95,
or the cygwin magic which figures out what a handle is before duplicating
it is wrong.

Anyone have any ideas?

Tim
 


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019