delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/02/11:07:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 2 Apr 2002 20:05:53 +0400
From: egor duda <deo AT logos-m DOT ru>
Reply-To: egor duda <cygwin AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <142122545681.20020402200553@logos-m.ru>
To: DEVRIENDT ERIK <Erik DOT Devriendt AT siemens DOT be>
CC: cygwin AT cygwin DOT com
Subject: Re: connect() does not work with UNIX domain datagram sockets
In-Reply-To: <40668DD4ED0FD511B74100E018043B73A51686@brub002a.siemens.be>
References: <40668DD4ED0FD511B74100E018043B73A51686 AT brub002a DOT siemens DOT be>
MIME-Version: 1.0

Hi!

Tuesday, 02 April, 2002 DEVRIENDT ERIK Erik DOT Devriendt AT siemens DOT be wrote:

DE> I am porting a client-server set of programs that run
DE> fine under linux.
DE> The programs communicate using UNIX domain datagram sockets.
DE> the server does the classic socket(), unlink(), bind() and then a loop
DE> with read(). There is no accept() because we use datagram
DE> sockets.

DE> The problem is in the client, which does socket(), connect()
DE> and then a loop with write() calls.
DE> The connect() hangs for 10 seconds and then fails with errno=111
DE> (Connection refused).
DE> When using sendto() I manage to send data, but that doesn't fit well
DE> in the current implementation of the client (we use the same
DE> codebase for several platforms). 
DE> According to the man pages of select() on linux and HP-UX it is allowed
DE> to use connect() with datagram sockets; it sets the default destination
DE> address for the communication over that socket.

DE> Is this a cygwin bug, or am I doing something wrong ?

It may be cygwin bug. You can do a couple of things to help us to find
it out. First, send a test program to the list, i'll try to reproduce
the problem. Second. Try running your program using strace utility,
like this:

strace -f -b 65000 -o strace.log some_program.exe

Then look into strace.log. I bet it will contain a string "accept from
unauthorized server" string (or "connect from unauthorized client").
If that's so, can you please send me strace.log.bz2 via personal
e-mail to <deo AT logos-m DOT ru> ?

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


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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