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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=Lkbkca7sA6mX6DBl dTesmLpLD4nTQ1Xo3eBgEwkXhzOicYsh+41nj/WVGXky8qzJ4Ru+7xxuF6dsk2Cm FuWxsr26ydORu03l1kyoBV6gnpgLawTMfNWhllcJzY7eOZrI4+zTG9PUcOXs5Dn8 spczyfEhFWi1cgc/xayuXqWuy8Q= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=/rb8lETSe68LevO9xYJ4rY p4cmY=; b=ddo7Jgn9FPTR0xXsNCtF0riX4HxUqYyQDnEPxsLfOpfdTjIrnlzMDS IBtoR4S1Y71HqK3QFRRWwJkGNeXMNz2zFaxgvUnIpTdohNMyaQqnJzOc/P113OyA NAu0vrBR01V9KMWVWEE14niTEfZRZRlEG7+aCZXPIBjtnU+p90d2Y= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=1.9 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, UD:bash.exe, bash.exe X-HELO: forward4o.cmail.yandex.net Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Date: Sat, 13 May 2017 18:57:23 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <1895295847.20170513185723@yandex.ru> To: "Brien Oberstein" , cygwin AT cygwin DOT com Subject: Re: Ctrl-Break killing subprocess even though handled in parent process In-Reply-To: <006701d2cbcd$444459b0$cccd0d10$@gmail.com> References: <006701d2cbcd$444459b0$cccd0d10$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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, Andrey Repin Saturday, May 13, 2017 18:53:59 Sorry for my terrible english... -- 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