Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.59 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.59 KB

GitHub license Run experiment Open in GitHub Codespaces

sig - Unix signals demonstration with subprocesses

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.

License

The code in this repository is licensed under 0BSD, a “public-domain equivalent” license.

See LICENSE.

Usage

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