From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81119 invoked by alias); 19 Jul 2015 12:56:50 -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 81108 invoked by uid 89); 19 Jul 2015 12:56:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: lb3-smtp-cloud2.xs4all.net Received: from lb3-smtp-cloud2.xs4all.net (HELO lb3-smtp-cloud2.xs4all.net) (194.109.24.29) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 19 Jul 2015 12:56:47 +0000 Received: from webmail.xs4all.nl ([194.109.20.205]) by smtp-cloud2.xs4all.net with ESMTP id uCwj1q00L4RV18J01CwjhD; Sun, 19 Jul 2015 14:56:44 +0200 Received: from a83-162-234-136.adsl.xs4all.nl ([83.162.234.136]) by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Sun, 19 Jul 2015 14:56:43 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 19 Jul 2015 12:56:00 -0000 From: Houder To: cygwin@cygwin.com Subject: Re: SIGINT generated by Control-C, is not delivered in mintty Mail-Followup-To: 55AAD9BF.5080703@towo.net Message-ID: X-Sender: houder@xs4all.nl (2e/FB3ysLX50Db6GoxBGeg==) User-Agent: XS4ALL Webmail X-SW-Source: 2015-07/txt/msg00285.txt.bz2 > I have a suspicion that the problem he is facing could be the same I > described in > > https://sourceware.org/ml/cygwin/2015-02/msg00122.html > where the issue only occurs if mintty is started from the cygwin > console. Sorry to interfere here, Thomas, but I had a hard time with your description ... It seems to me, that SIGINT is ignored if mintty is to interact with the "dos console" ... Henri Experiment: 1. mintty interacting with a "dos console" (SIGINT is ignored) call flow: cmd bash mintty ... a new window opens, where mintty/bash is NOT responsive to SIGINT (mintty interacts with cons) exec mintty ... (child process ... ?) ... another window opens, where mintty/bash is responsive to SIGINT (here mintty interacts with pty) [ i.e. simular to starting bash from within a dos concole, followed by the invocation of mintty ... ] 2. mintty NOT interacting with a "dos console" call flow: cmd mintty ... a new window opens, where mintty/bash is responsive to SIGINT (mintty w/o controlling terminal?) exec mintty (child process ... ?) ... another window opens, where mintty/bash is responsive to SIGINT [1] (here mintty interacts with pty) [ i.e. simular to starting mintty from within a dos concole ... ] [1] exec mintty is invoked here only as an additional experiment (i.e. it is not required) ----- detailed ... 1. mintty interacting with a "dos console" (SIGINT is ignored) [ starting bash from within a dos concole, followed by the invocation of mintty ... ] PATH (64) = /usr/local/bin:/usr/bin:/drv/c/... Executing .bash_profile Executing .bashrc, $- = himBH, login_shell on 64-@@ uname -a CYGWIN_NT-6.1 Seven 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 5064 4500 5064 5040 cons0 1000 13:30:55 /usr/bin/ps 4500 1 4500 4500 cons0 1000 13:30:48 /usr/bin/bash 64-@@ mintty ... a new window opens PATH (64) = /usr/local/bin:/usr/bin:/drv/c/WINDOWS/system32:/drv/c/WINDOWS:/drv/c/WINDOWS/System32/Wbem:/home/Henri/bin Executing .bashrc, $- = himBH, login_shell off 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 3768 1260 3768 1132 pty0 1000 13:33:27 /usr/bin/ps 4500 1 4500 4500 cons0 1000 13:30:48 /usr/bin/bash 1260 1468 1260 2088 pty0 1000 13:33:21 /usr/bin/bash 1468 4500 1468 2192 cons0 1000 13:33:21 /usr/bin/mintty <==== tty == cons 64-@@ <==== NOT responsive to SIGINT 64-@@ exec mintty ... another window opens PATH (64) = /usr/local/bin:/usr/bin:/drv/c/WINDOWS/system32:/drv/c/WINDOWS:/drv/c/WINDOWS/System32/Wbem:/home/Henri/bin Executing .bashrc, $- = himBH, login_shell off 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4284 4592 4284 3032 pty1 1000 13:35:18 /usr/bin/ps 4592 1260 4592 4052 pty1 1000 13:35:03 /usr/bin/bash 4500 1 4500 4500 cons0 1000 13:30:48 /usr/bin/bash 1468 4500 1468 2192 cons0 1000 13:33:21 /usr/bin/mintty 1260 1468 1260 4496 pty0 1000 13:33:21 /usr/bin/mintty <==== tty != cons 64-@@ ^C responsive to SIGINT 64-@@ 2. mintty NOT interacting with a "dos console" [ starting mintty from within a dos concole ... ] PATH (64) = /usr/local/bin:/usr/bin:/drv/c/... Executing .bash_profile Executing .bashrc, $- = himBH, login_shell on 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4344 1448 4344 4044 pty0 1000 13:40:58 /usr/bin/bash 2144 4344 2144 4308 pty0 1000 13:41:11 /usr/bin/ps 1448 1 1448 1448 ? 1000 13:40:58 /usr/bin/mintty <==== tty != cons 64-@@ ^C responsive to SIGINT 64-@@ ----- same experiment, but as an intermediate step: first start cmd from dos console ... 1. mintty interacting with a "dos console" (SIGINT is ignored) Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. 64-C:\Users\Henri> e:/Cygwin64/bin/bash PATH (64) = /drv/c/... Executing .bashrc, $- = himBH, login_shell off 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4884 784 4884 4868 cons0 1000 12:28:23 /usr/bin/ps 784 1 784 784 cons0 1000 12:27:49 /usr/bin/bash 64-@@ mintty ... a new window opens 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 1132 3548 1132 948 pty0 1000 12:29:43 /usr/bin/bash 3548 784 3548 4052 cons0 1000 12:29:43 /usr/bin/mintty <==== tty == cons 784 1 784 784 cons0 1000 12:27:49 /usr/bin/bash 2272 1132 2272 812 pty0 1000 12:29:48 /usr/bin/ps 64-@@ <==== NOT responsive to SIGINT ... 64-@@ exec mintty ... another window opens 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 4984 4788 4984 3396 pty1 1000 12:34:33 /usr/bin/ps 2712 4768 2712 2172 pty0 1000 12:34:05 /usr/bin/mintty <==== tty != cons 4768 784 4768 1704 cons0 1000 12:34:05 /usr/bin/mintty 4788 2712 4788 2856 pty1 1000 12:34:22 /usr/bin/bash 784 1 784 784 cons0 1000 12:27:49 /usr/bin/bash 64-@@ ^C <==== responsive to SIGINT ... 2. mintty NOT interacting with a "dos console" Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. 64-C:\Users\Henri> e:/Cygwin64/bin/mintty ... a new window opens 64-@@ ps ax PID PPID PGID WINPID TTY UID STIME COMMAND 3916 4736 3916 3968 pty0 1000 12:24:11 /usr/bin/bash 4736 1 4736 4736 ? 1000 12:24:10 /usr/bin/mintty <==== tty != cons 2568 3916 2568 2880 pty0 1000 12:24:17 /usr/bin/ps 64-@@ ^C <==== responsive to SIGINT ... ===== -- 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