From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100546 invoked by alias); 23 Jan 2020 10:49:20 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 100539 invoked by uid 89); 23 Jan 2020 10:49:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=culprit X-HELO: mail-lf1-f48.google.com Received: from mail-lf1-f48.google.com (HELO mail-lf1-f48.google.com) (209.85.167.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2020 10:49:18 +0000 Received: by mail-lf1-f48.google.com with SMTP id 9so1912574lfq.10 for ; Thu, 23 Jan 2020 02:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ZsuHRQrSPg1S1LhdSMkxTCyrlfcXYBXTktQboV6iquY=; b=T2SMBvTZEAqI7Lo6+tOktA2s6AGGfZoPmrTckUrGgwFnLUbS6ybPUEg+KUWFa4jCw3 k7bCwI3Up0FhYxwud4R2OdvsIw70thml71TDqrt79a4Lrd6WQwVa7twXJX5HAGklrgwR s0vTj8hRSy4opzeZarcCYwE2tUY9zARAHZx0PWkZPiZ/oNlHv/VRN3u85VOT1yDy00Eu qfPgQFjeW5FtBvek/0SnjKSe03cVYYmX9DuPA4zKteqyl1XWsKqec1czgv7GIjl0GaZL aAUCMYFA+JoRq0YLZalhehKaFHhHnWedz7iTbOOIPucpbH1TdneUU+c1FtQfY+EyBAp0 Jtxg== MIME-Version: 1.0 References: <20200121114747.d685f0be18276ee1d5002854@nifty.ne.jp> In-Reply-To: <20200121114747.d685f0be18276ee1d5002854@nifty.ne.jp> From: Koichi Murase Date: Thu, 23 Jan 2020 10:49:00 -0000 Message-ID: Subject: Cygwin 3.3.0: The programs compiled with "-mwindows" cannot read more than one byte from noncanonical mode TTY To: cygwin@cygwin.com Content-Type: multipart/mixed; boundary="000000000000709669059ccc64e0" X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00209.txt.bz2 --000000000000709669059ccc64e0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-length: 1252 2020=E5=B9=B41=E6=9C=8821=E6=97=A5(=E7=81=AB) 10:47 Takashi Yano : > Thanks for the report. I could reproduce the problem under LANG=3Dja_JP.U= TF-8. > I have almost caught the culprit. Please wait for a while. Thank you for the patch fixing the problem. I cherry-picked the patch and tried it, but there is another problem. Description: The programs compiled with "-mwindows" cannot read more than one character from PTY in a non-canonical mode in . There was no problem before the patch "Cygwin: pty: Fix reopening slave in push_to_pcon_screenbuffer().". Repeat-By: 1. Open Cygwin Terminal (mintty) 2. Compile the attached program with the following commands. $ g++ -o minimal2-con.exe minimal2.cpp $ g++ -mwindows -o minimal2-win.exe minimal2.cpp 3. The expected behavior can be checked with `minimal2-con'. After executing the command, please type some five characters. The string `[RECV]' will be printed five times, and then the program will exit. $ ./minimal2-con [RECV][RECV][RECV][RECV][RECV] $ 4. However, with the compile option "-mwindows", we can only see one `[RECV]', and the program will hang. $ ./minimal2-win [RECV] Best, Koichi --000000000000709669059ccc64e0 Content-Type: text/x-c-code; charset="US-ASCII"; name="minimal2.cpp" Content-Disposition: attachment; filename="minimal2.cpp" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k5qjknmo0 Content-length: 1005 I2luY2x1ZGUgPHVuaXN0ZC5oPgojaW5jbHVkZSA8dGVybWlvcy5oPgoKaW50 IG1haW4oKSB7CiAgc3RydWN0IHRlcm1pb3Mgb2xkVGVybWlvczsKICB0Y2dl dGF0dHIoU1RESU5fRklMRU5PLCAmb2xkVGVybWlvcyk7CgogIHN0cnVjdCB0 ZXJtaW9zIHRlcm1pb3MgPSBvbGRUZXJtaW9zOwogIHRlcm1pb3MuY19sZmxh ZyAmPSB+KEVDSE8gfCBJQ0FOT04gfCBJRVhURU4gfCBJU0lHKTsKICB0ZXJt aW9zLmNfaWZsYWcgJj0gfihCUktJTlQgfCBJQ1JOTCB8IElOUENLIHwgSVNU UklQIHwgSVhPTik7CiAgdGVybWlvcy5jX2NmbGFnICY9IH4oQ1NJWkUgfCBQ QVJFTkIpOwogIHRlcm1pb3MuY19jZmxhZyB8PSBDUzg7CiAgdGVybWlvcy5j X29mbGFnICY9IH4oT1BPU1QpOwogIHRlcm1pb3MuY19jY1tWTUlOXSAgPSAx OwogIHRlcm1pb3MuY19jY1tWVElNRV0gPSAwOwogIHRjc2V0YXR0cihTVERJ Tl9GSUxFTk8sIFRDU0FGTFVTSCwgJnRlcm1pb3MpOwoKICBmb3IgKGludCBp ID0gMDsgaSA8IDU7IGkrKykgewogICAgY2hhciBjOwogICAgaW50IGNvbnN0 IG5yZWFkID0gcmVhZChTVERJTl9GSUxFTk8sICZjLCAxKTsKICAgIHdyaXRl KFNURE9VVF9GSUxFTk8sIG5yZWFkID4gMCA/ICJbUkVDVl0iIDogIltGQUlM XSIsIDYpOwogIH0KICB0Y3NldGF0dHIoU1RESU5fRklMRU5PLCBUQ1NBRkxV U0gsICZvbGRUZXJtaW9zKTsKICB3cml0ZShTVERPVVRfRklMRU5PLCAiXG4i LCAxKTsKICByZXR1cm4gMDsKfQo= --000000000000709669059ccc64e0 Content-Type: text/plain; charset=us-ascii Content-length: 219 -- 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 --000000000000709669059ccc64e0--