From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id C13683858C27; Tue, 20 Apr 2021 08:47:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C13683858C27 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: pty: Make rlwrap work with cmd.exe. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: bb93c6d7c2c20d9edfb37d72ca3121cef05efde9 X-Git-Newrev: 5176afeb7d27339ee7ce8f1f9c8c0941da8ca4c2 Message-Id: <20210420084706.C13683858C27@sourceware.org> Date: Tue, 20 Apr 2021 08:47:06 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 08:47:06 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5176afeb7d27339ee7ce8f1f9c8c0941da8ca4c2 commit 5176afeb7d27339ee7ce8f1f9c8c0941da8ca4c2 Author: Takashi Yano Date: Mon Apr 19 20:51:53 2021 +0900 Cygwin: pty: Make rlwrap work with cmd.exe. - After the commit 919dea66, "rlwrap cmd" fails to start pseudo console. This patch fixes the issue. Diff: --- winsup/cygwin/fhandler_tty.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index ba9f4117f..d44728795 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1170,6 +1170,8 @@ fhandler_pty_slave::reset_switch_to_pcon (void) } if (isHybrid) return; + if (get_ttyp ()->pcon_start) + return; WaitForSingleObject (pcon_mutex, INFINITE); if (!pcon_pid_self (get_ttyp ()->pcon_pid) && pcon_pid_alive (get_ttyp ()->pcon_pid))