From: Mark Geisert <mark@maxrnd.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: qt terminal for gnuplot on cygwin workaround)
Date: Sun, 9 Jan 2022 22:35:46 -0800 [thread overview]
Message-ID: <814adaab-12b9-8d9d-3a0b-4921dc1ba122@maxrnd.com> (raw)
In-Reply-To: <1001697724.215333.1639890003868.JavaMail.yahoo@mail.yahoo.co.jp>
Hi Tatsuro,
Tatsuro MATSUOKA wrote:
> A workaround for qt enables qt termnal on Cygwin is shown by Enrico Forestieri
> https://sourceforge.net/p/gnuplot/mailman/gnuplot-beta/thread/16092.81463.qm@web103110.mail.kks.yahoo.co.jp/
>
> --- a/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
> +++ b/qtbase-everywhere-src-5.10.1/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;
>
> I myself generate library libQt5Network as libQt5Network-gnuplot and used gnuplot build.
> I dp not know that the modification avove is valid but enables me to use qt terminal on cygwin.
Apologies for the late response. As quoted above, the patch changes the number of
args passed to qt_safe_socket() so maybe that's incorrect?
In any case I think the intent was to change the call from nonblocking to
blocking. That seems likely to interfere with other socket or terminal I/O that
may be expected asynchronously.
I investigated the gnuplot vs Qterm problem several years ago and found the root
cause: deep within the Qt networking code a call to connect() wasn't expecting the
error EINPROGRESS to be returned. POSIX decrees this error when a nonblocking
connect() cannot immediately be completed. I opened a Qt BUG for this, but the Qt
folks declined to fix. I then tried making a Cygwin-only patch but was stymied by
my inability to build Qt itself due to bit rot.
If we have or can get a recent Qt build completed, I can supply a patch to fix the
issue.
..mark
next prev parent reply other threads:[~2022-01-10 6:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1001697724.215333.1639890003868.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2021-12-19 5:00 ` Tatsuro MATSUOKA
2022-01-10 6:35 ` Mark Geisert [this message]
[not found] <1418916945.1256064.1641807277537.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-10 9:34 ` Tatsuro MATSUOKA
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=814adaab-12b9-8d9d-3a0b-4921dc1ba122@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).