From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m0.truegem.net (m0.truegem.net [69.55.228.47]) by sourceware.org (Postfix) with ESMTPS id 691463858402 for ; Mon, 10 Jan 2022 06:35:53 +0000 (GMT) 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 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id 20A6Zql8088171 for ; Sun, 9 Jan 2022 22:35:52 -0800 (PST) (envelope-from mark@maxrnd.com) Received: from 162-235-43-67.lightspeed.irvnca.sbcglobal.net(162.235.43.67), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpdiJ3M7F; Sun Jan 9 22:35:46 2022 Subject: Re: qt terminal for gnuplot on cygwin workaround) To: "cygwin@cygwin.com" References: <1001697724.215333.1639890003868.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1001697724.215333.1639890003868.JavaMail.yahoo@mail.yahoo.co.jp> From: Mark Geisert 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2022 06:35:56 -0000 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