From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38752 invoked by alias); 23 Jan 2020 11:33:11 -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 38745 invoked by uid 89); 23 Jan 2020 11:33:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=murase, Koichi, H*MI:sk:EPQk6fp, H*MI:sk:b6fd023 X-HELO: conssluserg-06.nifty.com Received: from conssluserg-06.nifty.com (HELO conssluserg-06.nifty.com) (210.131.2.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2020 11:33:08 +0000 Received: from Express5800-S70 (ntsitm247158.sitm.nt.ngn.ppp.infoweb.ne.jp [124.27.253.158]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 00NBWtRG031721 for ; Thu, 23 Jan 2020 20:32:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 00NBWtRG031721 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1579779176; bh=oq3WHgzQ+TClpdaatigjOx6S8zSU+TZE0B+3QZcUSdk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=QvOyaDRyBl8VTT/7oTqDk0YPFaDP0ZA40joqg06Cyce5UbwWyRfeNjk7AjEzcGNVS hPP8OJtPP9EGUPzXo6wNqwHK0yJo/vqleCDXZxl0HxrAX+akm8gG/08oMLpzmgd4oS vzOBJz2I5m4aqFxTDXkMJmLxsdKP710FdHM2yyheFaOfaXgk4FVwZQROD9DGxtzkaC G0DptqVWNhFwi3Pjw+NZ7+G/DNvF4of56IqVGp2e9AOQk2Jdn9aYcIcI/BOkw40Apg xsuSpX2df3wL910LoFXEfbpvTNPyWm5GctY35dnBzB9rsudyNTnvU945k5gcV4e+/J bV+TgDnegug8A== Date: Thu, 23 Jan 2020 11:33:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: Cygwin 3.3.0: The programs compiled with "-mwindows" cannot read more than one byte from noncanonical mode TTY Message-Id: <20200123203309.dd0c36288fdce0d79ef4d14d@nifty.ne.jp> In-Reply-To: References: <20200121114747.d685f0be18276ee1d5002854@nifty.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00210.txt.bz2 On Thu, 23 Jan 2020 18:49:04 +0800 Koichi Murase wrote: > 2020年1月21日(火) 10:47 Takashi Yano : > > Thanks for the report. I could reproduce the problem under LANG=ja_JP.UTF-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] Thanks for the report again. Apparently, close() before reopening slave which I added just in case was superfluous. I will submit a patch for this issue. -- Takashi Yano -- 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