c6894da66c32f5eb80d37544dd3f667b82b70b7e
die-with-parent
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
Languages
C
61.4%
Roff
25.4%
Awk
8.5%
Makefile
4.7%