From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64940 invoked by alias); 13 Jan 2020 11:02: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 64932 invoked by uid 89); 13 Jan 2020 11:02:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=H*f:sk:ad285b6, H*MI:sk:ad285b6, H*i:sk:ad285b6 X-HELO: conssluserg-03.nifty.com Received: from conssluserg-03.nifty.com (HELO conssluserg-03.nifty.com) (210.131.2.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2020 11:02:08 +0000 Received: from Express5800-S70 (ntsitm247158.sitm.nt.ngn.ppp.infoweb.ne.jp [124.27.253.158]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 00DB1kSR007101 for ; Mon, 13 Jan 2020 20:01:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 00DB1kSR007101 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1578913306; bh=Hi7YrQ+CUOig0rBDUWdqmugGMWfpZBEt47laVO0EOT4=; h=Date:From:To:Subject:In-Reply-To:References:From; b=vEqZBSV+ro/e0pvGFbXhEPnTYyVDdWtjWOZBI2QeHKiyfLa/JOzIH73C23LpuxmZs FAJa2RLzuGTxHsXnDLxO8zItNpmh5KyVK0bH+Dg/G9TsM+5dgeyZEzu5CrhrjdV1qI MlBa9ww5GyVLMe4ugRqLuZx2w9VaxQH8dax2a8YCI93VtWPJwb5LxwjwvPub3oMESE ttfGdo8i608oOrv7DF7nMdJwJPKxlhu4Hs7GPlGqhN8QICZXIPmJZO6zRE0o/bjMFH G9Y8+oOGOHwqpDRB7Zr855l4qi+UBPQXkMJXE7GnBqR9snW1QMX2N3ymdNhpAI1i2J 4nuwFvd9uQmEA== Date: Mon, 13 Jan 2020 11:02:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: stty -cooked not usable since cygwin-3.1.1-1 Message-Id: <20200113200152.5243a304d481677c61c12450@nifty.ne.jp> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00121.txt.bz2 On Mon, 13 Jan 2020 11:52:43 +0100 Rabbe Fogelholm wrote: > I am running a console Java program that is started from a shellscript > wrapper. Before invoking Java the wrapper calls `stty -cooked'. The Java > program polls the keyboard using System.in.available() and reads > characters immediately using System.in.read(), without waiting for the > Enter key to be pressed. > > This way of combining `stty -cooked' and Java has stopped working since > version 3.1.1-1 of the Cygwin package. The Java thread that reads the > keyboard hangs until Enter is pressed, which is not desirable. > > I had to downgrade to version 3.0.7-1 to resolve the problem. > > Versioning information: > > java version "1.8.0_202" > Java(TM) SE Runtime Environment (build 1.8.0_202-b08) > Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode) > > OS Name: Microsoft Windows 10 Pro > Version: 10.0.17763 Build 17763 > System Type: x64-based PC > > See also the enclosed cygcheck.out. > > To demonstrate the issue I enclose a small Java program that should be > able to read single keystrokes when `stty -cooked' is in effect. Does your java program work in command prompt? cygwin 3.1.x uses pseudo console, so the native (non cygwin) program works as if it is executed in command prompt. -- 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