This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CTRL-c kills all children of current parent process.


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]