EliahKagan / sig

Unix signals demonstration on a subprocess with its own subprocess

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Unix signals demonstration on a subprocess with its own subprocess

License:BSD Zero Clause License


Languages

Language:C 56.8%Language:Shell 41.0%Language:Makefile 2.2%