public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Houder" <houder@xs4all.nl>
To: cygwin@cygwin.com, "Thomas Wolff" <towo@towo.net>
Subject: Re: SIGINT generated by Control-C, is not delivered in mintty
Date: Tue, 21 Jul 2015 08:45:00 -0000	[thread overview]
Message-ID: <db1967ec476f3dc94cebca4bbe44a238.squirrel@oude-webmail.xs4all.nl> (raw)
In-Reply-To: <55AD4E17.3060804@towo.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

  reply	other threads:[~2015-07-21  8:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  7:44 Ronald Fischer
2015-07-14  9:28 ` Achim Gratz
2015-07-15  8:24   ` Ronald Fischer
2015-07-18 22:57   ` Thomas Wolff
2015-07-15  8:47 ` Marco Atzeri
2015-07-15 14:40   ` Thomas Wolff
     [not found] ` <55A9517A.5090308@towo.net>
2015-07-20 10:59   ` Ronald Fischer
2015-07-20 12:16     ` Houder
2015-07-20 12:50       ` Ronald Fischer
2015-07-20 13:40         ` Houder
2015-07-20 13:50           ` Ronald Fischer
2015-07-20 19:38           ` Thomas Wolff
2015-07-21  8:45             ` Houder [this message]
2015-07-21 15:57               ` Thomas Wolff
2015-07-21 21:32                 ` Houder
2015-07-19 12:56 Houder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db1967ec476f3dc94cebca4bbe44a238.squirrel@oude-webmail.xs4all.nl \
    --to=houder@xs4all.nl \
    --cc=cygwin@cygwin.com \
    --cc=towo@towo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).