public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin@cygwin.com
Subject: Re: Patch request to qt 5.9.4
Date: Wed, 13 Mar 2019 08:33:00 -0000	[thread overview]
Message-ID: <Pine.BSF.4.63.1903130118170.46302@m0.truegem.net> (raw)
In-Reply-To: <1346787976.482037.1552451229824.JavaMail.yahoo@mail.yahoo.co.jp>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1723 bytes --]

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 stripped and 
> 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 
non-blocking socket not working under Cygwin.

It's in Qt's qlocalsocket_unix.cpp.  On line 285 there's a call to 
qt_safe_connect().  At this point the socket fd has already been set 
non-blocking.  Within qt_safe_connect() there's a call (eventually) to 
Cygwin's connect().  That connect() is returning -1 with errno set to 
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 
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 
knows Qt network internals will have to develop a real fix.

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

..mark

[-- Attachment #2: Type: text/plain, Size: 219 bytes --]


--
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

  reply	other threads:[~2019-03-13  8:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1439412702.1866573.1551653028041.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2019-03-03 22:43 ` Patch request to qt 5.9.4 (Re: [ANNOUNCEMENT] Qt 5.9.4) Tatsuro MATSUOKA
2019-03-04 16:32   ` Yaakov Selkowitz
2019-03-04 22:29     ` Tatsuro MATSUOKA
2019-03-05 12:57     ` Tatsuro MATSUOKA
2019-03-05 19:24       ` Achim Gratz
2019-03-05 23:58         ` Tatsuro MATSUOKA
2019-03-06  0:10         ` Tatsuro MATSUOKA
2019-03-06  1:10           ` Tatsuro MATSUOKA
2019-03-06  1:55             ` Tatsuro MATSUOKA
2019-03-06  2:25               ` Tatsuro MATSUOKA
2019-03-11  0:28     ` Tatsuro MATSUOKA
2019-03-11  0:50       ` Andrey Repin
2019-03-11  0:53       ` Yaakov Selkowitz
2019-03-11  3:33         ` Tatsuro MATSUOKA
2019-03-11  7:21           ` Mark Geisert
2019-03-11  7:56             ` Tatsuro MATSUOKA
2019-03-12  4:21               ` Mark Geisert
2019-03-12  6:51                 ` Tatsuro MATSUOKA
2019-03-12  8:04                   ` Patch request to qt 5.9.4 Mark Geisert
2019-03-12  8:26                     ` Tatsuro MATSUOKA
2019-03-12 19:37                       ` Achim Gratz
2019-03-12 23:22                       ` Tatsuro MATSUOKA
2019-03-13  1:12                         ` Mark Geisert
2019-03-13  4:27                           ` Tatsuro MATSUOKA
2019-03-13  8:33                             ` Mark Geisert [this message]
2019-03-15  8:06                               ` Mark Geisert
2019-03-15  9:40                                 ` Tatsuro MATSUOKA
2019-03-16  0:41                                   ` Tatsuro MATSUOKA
2019-03-12 19:34                     ` Achim Gratz
2019-03-11  9:45             ` Patch request to qt 5.9.4 (Re: [ANNOUNCEMENT] Qt 5.9.4) Corinna Vinschen
2019-03-12  4:16               ` Mark Geisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSF.4.63.1903130118170.46302@m0.truegem.net \
    --to=mark@maxrnd.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).