This is a demonstration of signals in Unix-like systems, when a process receiving a signal has its own subprocesses.
A C compiler and make
are needed.
The code in this repository is licensed under 0BSD, a “public-domain equivalent” license.
See LICENSE
.
Run:
./run-experiment
Or experiment interactively by building sig
and running it directly (you
may need to kill the subprocesses yourself).
The run-experiment
script takes care of building the sig
program from
sig.c
if this has not been done. You can also build sig
by running:
make
Then to run sig
:
./sig
The sig
command accepts a signal number as an argument. For example, to make
it use SIGKILL
instead of its default of SIGTERM
, run:
./sig 9
Or to have the run-experiment
script call sig
that way:
./run-experiment 9