Linux: start another process when a given one exits; send sigstop to certain processes as they execute; ...
fnordomat b743bb6f00 fixed some mistakes | %!s(int64=5) %!d(string=hai) anos | |
---|---|---|
src | %!s(int64=5) %!d(string=hai) anos | |
.gitignore | %!s(int64=5) %!d(string=hai) anos | |
LICENSE | %!s(int64=5) %!d(string=hai) anos | |
Makefile.am | %!s(int64=5) %!d(string=hai) anos | |
README.md | %!s(int64=5) %!d(string=hai) anos | |
configure.ac | %!s(int64=5) %!d(string=hai) anos |
This is work in progress.
Start one process when another (specified by PID) quits, or perform an action when a process whose commandline begins with a given prefix starts. The action can be: trigger another command or send the new process a SIGSTOP as soon as it is detected.
Linux with CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y configured.
touch config.rpath
autoreconf -iv
./configure --prefix=/usr/local
make
upon exec m"xyz" "run abc"
upon exit p4711 "run abc"
upon -vv exec m"/usr/lib/firefox/firefox" sigstop
[SO Q 6075013](https://stackoverflow.com/questions/6075013/how-to-detect-the-launching-of-programs-on-linux_
Thanks to the various people who shared their "cn_proc" C code under FLOSS licenses.
Make sure it is as safe as it can be. Identify and implement missing features (regex matching; command line arguments for the "run" action). More testing. Improve the code. Optimize.