From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90801 invoked by alias); 20 Mar 2015 09:15:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 89581 invoked by uid 89); 20 Mar 2015 09:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-lb0-f177.google.com Received: from mail-lb0-f177.google.com (HELO mail-lb0-f177.google.com) (209.85.217.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 20 Mar 2015 09:15:35 +0000 Received: by lbblx11 with SMTP id lx11so48737401lbb.3 for ; Fri, 20 Mar 2015 02:15:32 -0700 (PDT) X-Received: by 10.112.210.230 with SMTP id mx6mr41437504lbc.64.1426842931941; Fri, 20 Mar 2015 02:15:31 -0700 (PDT) Received: from MAR2.lan (92-100-228-216.dynamic.avangarddsl.ru. [92.100.228.216]) by mx.google.com with ESMTPSA id dy8sm801531lac.13.2015.03.20.02.15.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Mar 2015 02:15:31 -0700 (PDT) Date: Fri, 20 Mar 2015 09:40:00 -0000 From: Ilya Basin Reply-To: Ilya Basin Message-ID: <1455102057.20150320121530@gmail.com> To: cygwin@cygwin.com Subject: Prevent Ctrl-C kill native process MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00356.txt.bz2 How to tell Cygwin not to kill a native process when I press Ctrl-C ? I tried to run it in background, but it doesn't help, when its output is piped. Compare these: ( while true; do echo aaa; sleep 1; done & ) | ( trap '' INT; cat ) ( while true; do echo aaa; sleep 1; done ) | ( trap '' INT; cat ) ( /cygdrive/c/Windows/system32/ping -t localhost ) | ( trap '' INT; cat ) ( /cygdrive/c/Windows/system32/ping -t localhost & ) | ( trap '' INT; cat ) The last command should not die, when I press Ctrl-C, but it dies anyway. -- 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