who gets ctrl-c

If I hit CRTL-C in a terminal where I run a program that spawns multiple
threads/processes, which thread/process get that signal?
thanks
Markus

Markus Loffler <loffler@ces.clemson.edu> wrote:

If I hit CRTL-C in a terminal where I run a program that spawns multiple
threads/processes, which thread/process get that signal?

All the processes in the foreground process group.


Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.

Wojtek Lerch <wojtek@qnx.com> wrote:

Markus Loffler <> loffler@ces.clemson.edu> > wrote:
If I hit CRTL-C in a terminal where I run a program that spawns multiple
threads/processes, which thread/process get that signal?

All the processes in the foreground process group.

And within each process:
– if the signal is ignored, it is thrown away
– if not, if any thread has it unmasked, then one of the threads
with the signal unmasked will be chosen to receive the signal
(which will, normally, kill the process)

-David

QNX Training Services
dagibbs@qnx.com