delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/10/20:27:31

X-Spam-Check-By: sourceware.org
Date: Sun, 10 Dec 2006 20:26:30 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <parentid>` 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019