Patch request to qt 5.9.4 (Re: [ANNOUNCEMENT] Qt 5.9.4)
Tatsuro MATSUOKA
tmacchant2@yahoo.co.jp
Tue Mar 12 06:51:00 GMT 2019
----- Original Message -----
> From: Mark Geisert
> To: cygwin
> Date: 2019/3/12, Tue 13:20
> Subject: Re: Patch request to qt 5.9.4 (Re: [ANNOUNCEMENT] Qt 5.9.4)
>
>T atsuro MATSUOKA wrote:
>> ----- Original Message -----
>>
>>> From: Mark Geisert
>>> To: cygwin
>>> Cc:
>>> Date: 2019/3/11, Mon 16:21
>>> Subject: Re: Patch request to qt 5.9.4 (Re: [ANNOUNCEMENT] Qt 5.9.4)
>>>
>>> T atsuro 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
>>>
>>
>> I send xz commpress gnuplot.trace.
>
> Next time we'll arrange private email for large things. I'm now poring
> over the
> strace; thanks for sending it.
>
> If it's not too much trouble, could you show what you tell gnuplot and how
> you
> set up the Qt environment? Are you running gnuplot from inside qterminal?
>
> ..mark
For qt graphics
gnuplot.exe uses driver process named gnuplot_qt.exe.
gnuplot.exe tries connect with gnuplot_qt.exe
by
qt->socket.connectToServer(server);
in gnuplot.exe code but fails to connect with gnuplot_qt.exe.
Tatsuro
--
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
More information about the Cygwin
mailing list