delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/06/15/09:39:38

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Date: Fri, 15 Jun 2001 17:36:33 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.53 RC/4)
Reply-To: egor duda <cygwin-apps AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <10093125657.20010615173633@logos-m.ru>
To: "Ralf Habacker" <Ralf DOT Habacker AT saght DOT tessag DOT com>
CC: "Cygwin-Apps" <cygwin-apps AT cygwin DOT com>
Subject: Re: accept() failed message on kde 1.1.2 ??
In-Reply-To: <000501c0f599$49f41bf0$6e032bb7@BRAMSCHE>
References: <000501c0f599$49f41bf0$6e032bb7 AT BRAMSCHE>
MIME-Version: 1.0

Hi!

Friday, 15 June, 2001 Ralf Habacker Ralf DOT Habacker AT saght DOT tessag DOT com wrote:

RH> I have applied the patch and as i see on short tests it works without
RH> errors. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

RH> Next week I think we have to figure out, whats going wrong

if you're to debug this yourself i can suggest you one more way to use
if running under strace dissolves the problem. you can change some of
debug_printf()s to system_printf()s -- they're printing things right
to the console.

i'd try to explain how things work (or at least supposed to work).

some application bind()s to a AF_UNIX socket. on cygwin, AF_UNIX
socket is a file of the following structire:

!<socket >port secret-cookie

where "port" is a AF_INET port used to emulate this socket and secret
cookie is some random 128-bit value.

when later application calls accept() on this socket, it creates
"server-side-secret-event". it's an event named
"cygwin.local_socket.secret.<port-number>.<secret-cookie>"
where port-number is local port number on which application accepts()
connection, and secret-cookie is that 128-bit value stored if socket
file.

Application that calls connect() is doing basically the same: it
creates "client-side-secret-event", named just like "server-side" one,
with only one exception -- port-number is a port from which connect()
is initiated.

now, everythig's ready and all client and server must do is to
"authenticate" each other. They're doing that by opening peer's secret
event (they can do it because they know both peer port and cookie),
signal it, and wait until peer signals their secret event. after that,
they proceed just like with normal socket connection.

Hope this explanation helps.

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19

- Raw text -


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