SIGINT generated by Control-C, is not delivered in mintty

Thomas Wolff towo@towo.net
Mon Jul 20 19:38:00 GMT 2015


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



More information about the Cygwin mailing list