delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/03/13/04:33:45

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:in-reply-to:message-id
:references:mime-version:content-type; q=dns; s=default; b=U39BD
najB8SxjqQWCSLrQxxAhHry2AOzf+0Q9urhK1kIEFaQG7b2gOcdlh2u8cjnq/f+2
ytEuhRc9/49Rzxs6OJluwgoTmUFdI8kXrbv6Nh2txRmD01vgCbxlJa+D8gIqdPx6
h956Pvj8dv0T3pzD1xk+KLrmf+x36aDKJy1aWQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:in-reply-to:message-id
:references:mime-version:content-type; s=default; bh=FMNVD6/9EUh
DgggXS6xUALyJzXU=; b=xND0NA3S+HZ0P2vXK7vpWA53WLJwp3ZCcUrwSBT5HIP
bBylujT5e5rrMl07kXdvixSZhxiCSovwVj4o4jqwdZZkUd6U9OCiEVM8/iAkbey5
h2/0TXiMiYTIZxNOO6ZYa5+xgFpSK1o+R2Ea6GUdamwkEtphFn8mA05NmH8Whlzk
=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT autolearn=no version=3.3.1 spammy=HX-Languages-Length:1679, H*c:HHHHHHHH
X-HELO: m0.truegem.net
Date: Wed, 13 Mar 2019 01:33:31 -0700 (PDT)
From: Mark Geisert <mark AT maxrnd DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Patch request to qt 5.9.4
In-Reply-To: <1346787976.482037.1552451229824.JavaMail.yahoo@mail.yahoo.co.jp>
Message-ID: <Pine.BSF.4.63.1903130118170.46302@m0.truegem.net>
References: <1439412702 DOT 1866573 DOT 1551653028041 DOT JavaMail DOT yahoo DOT ref AT mail DOT yahoo DOT co DOT jp> <1439412702 DOT 1866573 DOT 1551653028041 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT co DOT jp> <0faa5fb55a0af4803fcdff786dba8be440355609 DOT camel AT cygwin DOT com> <1896876564.419596.1552373491409.JavaMail.yah <1346787976 DOT 482037 DOT 1552451229824 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT co DOT jp>
MIME-Version: 1.0

--0-57172657-1552466011=:46302
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Wed, 13 Mar 2019, Tatsuro MATSUOKA wrote:
[...]
>>>  I have prepared binaries:
>>>  http://tmacchant3.starfree.jp/gnuplot/Eng/cyg_qt_test/
>>>
>>>  test
>>>  From gnplot prompt
>>>
>>>  gnuplot> set terminal qt
>>>  gnuplot> plot x
>>>
>>>  Without Qt patch
>>>
>>>  Could not connect to existing gnuplot_qt. Starting a new one.
>>>
>>>  Warning: slow font initialization
>>>
>>>
>>>
>>>  With Qt patchplot appears
[...]
> One note: for gnuplot.exe and gnuplot_qt.exe, debug symbols are not strip=
ped and=C2=A0
> you can trace gdb but I did not know debug info for Qt.

I believe I've found the root cause of this issue of outbound connect on a=
=20
non-blocking socket not working under Cygwin.

It's in Qt's qlocalsocket_unix.cpp.  On line 285 there's a call to=20
qt_safe_connect().  At this point the socket fd has already been set=20
non-blocking.  Within qt_safe_connect() there's a call (eventually) to=20
Cygwin's connect().  That connect() is returning -1 with errno set to=20
EINPROGRESS.

Back in qlocalsocket_unix.cpp, line 287 does a 'switch(errno)' but doesn't
have a case for EINPROGRESS.  That error condition reaches the 'default:'
case, returning without the connection being completed.  I don't know why=
=20
there's no error report to the user.

Note that you don't want to quick-fix this by adding a 'case EINPROGRESS:'
that simply acts like the connection is completed.  I think somebody who=20
knows Qt network internals will have to develop a real fix.

It seems nobody has run across a non-blocking connect() that doesn't=20
immediately complete connection.. but Posix mandates an EINPROGRESS error=
=20
in that situation so Cygwin appears to be doing the right thing.

..mark=


--0-57172657-1552466011=:46302
Content-Type: text/plain; charset=us-ascii


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

- Raw text -


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