This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: CTRL-c kills all children of current parent process.
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 10 Dec 2006 20:26:30 -0500
- Subject: Re: CTRL-c kills all children of current parent process.
- References: <457CAF41.7010207@scytek.de>
- Reply-to: 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/