delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/01/10/01:36:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 691463858402
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=maxrnd.com
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=maxrnd.com
Subject: Re: qt terminal for gnuplot on cygwin workaround)
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
References: <1001697724 DOT 215333 DOT 1639890003868 DOT JavaMail DOT yahoo DOT ref AT mail DOT yahoo DOT co DOT jp>
<1001697724 DOT 215333 DOT 1639890003868 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT co DOT jp>
From: Mark Geisert <mark AT maxrnd DOT com>
Message-ID: <814adaab-12b9-8d9d-3a0b-4921dc1ba122@maxrnd.com>
Date: Sun, 9 Jan 2022 22:35:46 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Firefox/52.0 SeaMonkey/2.49.4
MIME-Version: 1.0
In-Reply-To: <1001697724.215333.1639890003868.JavaMail.yahoo@mail.yahoo.co.jp>
X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 DOT 81463 DOT qm AT web103110 DOT mail DOT kks DOT yahoo DOT co DOT 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

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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