public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: SIGINT generated by Control-C, is not delivered in mintty
Date: Mon, 20 Jul 2015 19:38:00 -0000	[thread overview]
Message-ID: <55AD4E17.3060804@towo.net> (raw)
In-Reply-To: <79ac7f5abad2d03fbd8b442b38bcbd56.squirrel@oude-webmail.xs4all.nl>

Am 20.07.2015 um 15:40 schrieb Houder:
>>>> Indeed, it does! When starting it from a desktop shortcut, it works, but
>>>> when started as a background process, it doesn't.
>>> Ah, so that is the "Cygwin console" # i.e. execution of the file
>>> Cygwin.bat, located in the "Windows Cygwin root".
>> Actually no, though the difference doesn't matter - but for the safe
>> side, here are the gory details:
>>
>> In a cmd.exe Command window (or, to be more precise, in a command window
>> hosted by the Console2 console), I use the command
>>
>>       cmd /c c:\cygwin64\bin\zsh -l
>>
>> to start an interactive zsh Shell, and from *this*, I start a Ruby
>> program, and from *this*, a mintty is started in the background.
>>
>> But I can see the effect simpler in this way: Just open a DOS Command
>> Window, and in the command line type
>>
>>      c:\cygwin64\bin\zsh -c /usr/bin/mintty
>>
>> and the error can be reproduced. BTW, same effect with bash instead of
>> zsh.
> Understood.
>
> For the moment, invoke mintty through cmd, i.e. put cmd between Ruby and
> mintty. That should help.
It also helps to prefix the invocation in setsid: from cmd / bash 
(Cygwin.bat):
setsid mintty
works fine.
> The trick is to make mintty NOT interact with a cons.
Not sure in what way mintty would "interact" with the console here.

I should be able to simulate the setsid within mintty although a simple 
call to setsid() did not succeed.
I guess that would be a workaround rather than a fix because I suspect 
the problem to be in cygwin; it had appeared in cygwin 1.7.18 and the 
changelog lists plenty of changes related to signal handling.
------
Thomas

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

  parent reply	other threads:[~2015-07-20 19:38 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 [this message]
2015-07-21  8:45             ` Houder
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=55AD4E17.3060804@towo.net \
    --to=towo@towo.net \
    --cc=cygwin@cygwin.com \
    /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).