X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=nxRB0bq93fuar8QRwBYVmHdBVQIzmnQ/Y4RmrCvS6BE P3f/JK6Fh7UTOH1S2QN9nqB62G7XIMYRi2MDOPMP8elTN5jtpNsEK3sFUtgeEHyv qZeevCOJYTgmjioGvsXW6wUfbdCFMDShE5QiPQvTotW9uNYf4QcbS8sQ6Yhb6kZQ = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=e2n3Lw4y5YQOqWS9gX4stMPtYh4=; b=rtso8PcvvExRcTqs2 RAlvRFioNnxQbzn0ZkquNt5Ebzhwpp1v8B836mhelo/FRv/oFgD6Vkqci1Kc6BGm d3GpEimah/Uq9uh2szvxTHN4Ijayfp7MIHXT5MtaCl/6ZiuOsSPrin0pap1RsIBL tkMkDMDQCLsSZg7gU3AxqzJGNM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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 20:01:52 +0900 From: Takashi Yano To: cygwin AT cygwin DOT 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 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