Wrapper process to ensure child processes die even if their parents are killed
  • C 61.4%
  • Roff 25.4%
  • Awk 8.5%
  • Makefile 4.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-01-20 05:44:54 -08:00
.gitignore Initial commit 2026-01-10 04:10:52 -08:00
die-with-parent.1 Fix typos 2026-01-10 04:17:22 -08:00
die-with-parent.c Fix pid issue 2026-01-14 03:59:36 -08:00
gen-signal-names.awk Fix awk script 2026-01-15 20:44:43 -08:00
LICENSE Initial commit 2026-01-10 04:10:52 -08:00
Makefile Fix typos 2026-01-10 04:17:22 -08:00
README.md Add jenkins badge to README.md 2026-01-20 05:44:54 -08:00

die-with-parent

Build Status

die-with-parent is a small program that allows you to ensure a child process dies when its parent does, even if the parent died due to a SIGKILL. It currently only works on Linux (though it could be easily modified to work on other OSes in the future).

Building and Installation

To build, just run make. Install with make install. Optionally, make PREFIX=path/to/prefix install can be used to specify an installation prefix.

Usage

To use, wrap the command you want to run with die-with-parent:

die-with-parent your-command-here -some -cool -args

to avoid race conditions (see the man page) you should pass the parent process' PID with the -p flag. For example, in sh or bash:

die-with-parent -p $$ your-command-here -some -cool -args