delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/07/21/04:46:06

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:message-id:in-reply-to:references:date:subject
:from:to:mime-version:content-type:content-transfer-encoding; q=
dns; s=default; b=ExvZTPpjrbDu5GWNL7fZkm09TKphXRu53KgfdZ/U2qftzz
3d6JOc+M/m/IWPOvcXzIuvWAc1PNXYXhC/ERTJaOnPv/uAWgzCA8jSqLSuvCcRG7
f2BFPExAK4VkRWwb9acGQMHWzFeui6znsPBpSzGUc4z7sPX8OED9W93qnmu/U=
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:message-id:in-reply-to:references:date:subject
:from:to:mime-version:content-type:content-transfer-encoding; s=
default; bh=Xz4IQOJ3b4SGDB2CoUb0Fcp6alg=; b=RRrwZCxLmYrDsskNH3N7
hf899CNuDIsFRPwMgX7AjNn6BO9aBzqi2n7RNIiXCbvD8eHgKZfr5I/8GaOsjfUL
BBjXMCwVBl1wKv8SWiM8VRCcmgjnNWKQNUjUcl4rJmjriG0DTbIgGP4dbHz2RhR9
3tIU4WAeqwVgt2hGpAwPH9o=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_40,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: lb3-smtp-cloud6.xs4all.net
Message-ID: <db1967ec476f3dc94cebca4bbe44a238.squirrel@oude-webmail.xs4all.nl>
In-Reply-To: <55AD4E17.3060804@towo.net>
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>
Date: Tue, 21 Jul 2015 10:45:41 +0200
Subject: 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>
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
X-IsSubscribed: yes

>> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019