This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: SIGINT generated by Control-C, is not delivered in mintty
- From: "Houder" <houder at xs4all dot nl>
- To: cygwin at cygwin dot com, "Thomas Wolff" <towo at towo dot net>
- Date: Tue, 21 Jul 2015 10:45:41 +0200
- Subject: Re: SIGINT generated by Control-C, is not delivered in mintty
- Authentication-results: sourceware.org; auth=none
- References: <1436859879 dot 3576693 dot 323109769 dot 13A8B37B at webmail dot messagingengine dot com> <55A9517A dot 5090308 at towo dot net> <1437389942 dot 2804270 dot 328057057 dot 1FF478B2 at webmail dot messagingengine dot com> <6e51c4c1411fb3878b6d7862d96ef4af dot squirrel at oude-webmail dot xs4all dot nl> <1437396634 dot 2825938 dot 328138033 dot 1915DBE0 at webmail dot messagingengine dot com> <79ac7f5abad2d03fbd8b442b38bcbd56 dot squirrel at oude-webmail dot xs4all dot nl> <55AD4E17 dot 3060804 at towo dot net>
>> The trick is to make mintty NOT interact with a cons.
> Not sure in what way mintty would "interact" with the console here.
Hi Thomas,
You are the expert on mintty now ... I only observed a "pattern":
- when 'ps ax' shows that mintty is "connected" to a 'cons', SIGINT is ignored
- when 'ps ax' shows that mintty is NOT "connected" to a 'cons', SIGINT is NOT ignored
See the difference in the 2 cases below.
Henri
1. invocation of 'mintty' (when bash is connected to a cons)
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
5076 1 5076 5076 cons0 1000 10:25:59 /usr/bin/bash <==== tty == cons
4772 5076 4772 3768 cons0 1000 10:26:38 /usr/bin/ps
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
4056 5076 4056 2852 cons0 1000 10:26:42 /usr/bin/mintty <==== tty == cons !!!!!
1076 1884 1076 4852 pty0 1000 10:27:50 /usr/bin/ps
5076 1 5076 5076 cons0 1000 10:25:59 /usr/bin/bash
1884 4056 1884 812 pty0 1000 10:26:42 /usr/bin/bash
64-@@ <==== NOT responding to SIGINT
2. invocation of 'setsid mintty' (when bash is connected to a cons)
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
3416 1380 3416 3560 cons0 1000 10:29:29 /usr/bin/ps
1380 1 1380 1380 cons0 1000 10:29:24 /usr/bin/bash <==== tty == cons
64-@@ setsid 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
896 1 896 1960 ? 1000 10:30:32 /usr/bin/mintty <==== tty != cons !!!!!
4160 1512 4160 4652 pty0 1000 10:30:35 /usr/bin/ps
1512 896 1512 2664 pty0 1000 10:30:32 /usr/bin/bash
I 1380 1 1380 1380 cons0 1000 10:29:24 /usr/bin/bash
64-@@ ^C
64-@@ <==== responding 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