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 (Re: [ANNOUNCEMENT] Qt 5.9.4)
Date: Mon, 11 Mar 2019 07:21:00 -0000	[thread overview]
Message-ID: <30cae96a-7c70-5634-85ce-3fe6b36a7d21@maxrnd.com> (raw)
In-Reply-To: <881759885.934635.1552275216926.JavaMail.yahoo@mail.yahoo.co.jp>

Tatsuro MATSUOKA wrote:
> ----- Original Message -----
>
>> From: Yaakov Selkowitz <yselkowitz
>> To: cygwin
>> Cc:
>> Date: 2019/3/11, Mon 09:53
>> Subject: Re: Patch request to qt 5.9.4 (Re: [ANNOUNCEMENT] Qt 5.9.4)
>>
>> On Mon, 2019-03-11 at 09:28 +0900, Tatsuro MATSUOKA wrote:
>>>  > On Mon, 2019-03-04 at 07:43 +0900, Tatsuro MATSUOKA wrote:
>>>  > >  I ask alpply a patch the below which enables to use qt terminal
>> on gnuplot
>>>  > for Cygwin.
>>>  > >  (cygQt5Network-5.dll is affected.)
>>>  > >
>>>  > >  ---
>> a/qtbase-opensource-src-5.9.4/src/network/socket/qlocalsocket_unix.cpp
>>>  > >  +++
>> b/qtbase-opensource-src-5.9.4/src/network/socket/qlocalsocket_unix.cpp
>>>  > >  @@ -239,7 +239,7 @@ void QLocalSocket::connectToServer(OpenM
>>>  > >      }
>>>  > >      // create the socket
>>>  > >  -    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX,
>> SOCK_STREAM, 0, O_NONBLOCK))) {
>>>  > >  +    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX,
>> SOCK_STREAM, 0))) {
>>>  > >          d->errorOccurred(UnsupportedSocketOperationError,
>> QLatin1String("QLocalSocket::connectToServer"));
>>>  > >          return;
>>>  > >
>>>  >
>>>  > It seems we keep going in circles on this point.  If there is a bug in
>>>  > O_NONBLOCK, then please either narrow it down to an STC, or provide a
>>>  > patch to Cygwin.
>>>
>>>  Very basic question. What is STC?
>>>  I googled but I cannot find what is it.
>>
>> https://cygwin.com/acronyms/#STC
>
>
> Sorry I cannot make STC due to lack of knowledge of QT.
> In stead, I explain what gnuplot do.
>
> On gnuplot for qt,
> plot is done by child process named gnuplot_qt.
>
> When gnuplot connect with gnuplot with
>   qt->socket.connectToServer(server);
>
>
> without the above patch ()
> qt_safe_socket(PF_UNIX, SOCK_STREAM, 0, O_NONBLOCK)))
> gnuplot cannot connect with gnuplot_qt.
>
> with the above patch ()
> qt_safe_socket(PF_UNIX, SOCK_STREAM, 0))
> gnuplot can connect with gnuplot_qt.
>
> Perhaps qt with O_NONBLOCK is some wrong with process connection.

Hi Tatsuro,
For the record, what Enrico supplied is what we'd call an STC, a Simple Test 
Case.  Unfortunately his STC dealt with select() on a named pipe.

Your gnuplot issue has to do with "Unix sockets", a form of IPC between 
processes.  Cygwin uses Windows named pipes to implement "Unix sockets" on 
Windows.  This means we are mapping Unix/Linux socket constructs onto a 
dissimilar feature of Windows, and there are many opportunities for mismatch.

Can you run your gnuplot under strace?  You would set up your environment as 
needed to reproduce the issue, then launch gnuplot as so:
     strace -o gnuplot.trace gnuplot
This will create a trace file of Cygwin syscalls and operations.  Let us know 
how big (how many lines) are in the trace file and we'll see what's next.

..mark


--
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-11  7:21 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 ` 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 [this message]
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
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=30cae96a-7c70-5634-85ce-3fe6b36a7d21@maxrnd.com \
    --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).