This is the mail archive of the
mailing list for the Cygwin project.
Re: Ctrl-Break killing subprocess even though handled in parent process
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: "Brien Oberstein" <brienpub at gmail dot com>, cygwin at cygwin dot com
- Date: Sat, 13 May 2017 18:57:23 +0300
- Subject: Re: Ctrl-Break killing subprocess even though handled in parent process
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp3o.mail.yandex.net; dkim=pass firstname.lastname@example.org
- References: <email@example.com>
- Reply-to: cygwin at cygwin dot com
Greetings, Brien Oberstein!
> I have a dotnet windows console application that runs a bash script as a
> subprocess using CreateProcess() under the covers.
> My windows app traps Ctrl-Break via SetConsoleCtrlHandler() and handles it
> (returning true from the handler).
> I execute the script via the command "bash.exe --login script.sh".
> Somehow the Ctrl-Break is reaching the subprocess and causing it to be
> killed, which is undesireable.
> Is there a way to either prevent the Ctrl-Break from reaching the cygwin
> subprocess or telling cygwin/bash to ignore it?
You will be laughing, but I just stumbled upon this issue myself with
TCC+bash -i. When I press ^Break in bash prompt, parent TCC dies.
With best regards,
Saturday, May 13, 2017 18:53:59
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple