X-Spam-Check-By: sourceware.org Date: Sun, 10 Dec 2006 20:26:30 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: CTRL-c kills all children of current parent process. Message-ID: <20061211012630.GA14193@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <457CAF41 DOT 7010207 AT scytek DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <457CAF41.7010207@scytek.de> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Sun, Dec 10, 2006 at 08:07:13PM -0500, Volker Quetschke wrote: >I encountered the problem that a CTRL-c in a shell (tested with bash in >rxvt and in cmd.exe with/without CYGWIN=tty (Yes, before I started the >bash)) kills all children started by the running process even though >it has its own signal handler in place. > >Take the attached source and compile it. >$ gcc breaktest.c -o breaktest.exe > >Start it and press CTRL-c: >$ ./breaktest.exe >Started child pid: 372 from parent 3504 >you have pressed ctrl-c >wait returned: 372 >pid: 372 wid: 372 >Done > >Hmm, the CTRL-c kills the child and the parent returns because >the child finished. > >Now start it again and send the SIGINT via `kill -INT ` from >another shell (3x in this example): Typing CTRL-C sends a SIGINT to every process in the process group, unlike using "kill -INT". cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/