I'd like to know if there's a way (maybe in .bash_profile?) to prevent the creation of any child processes with names matching a regex. In particular, examining output from ps -ax I am finding extra processes started by tools that I use, which I do not want to be created. I'm using a mac running os 10.14 mojave.
I'm not looking for post-fixes such as killall
or pkill -f my_pattern
which kills all processes matching regex 'my_pattern' as described here. I also realize that the "right" way to do this is likely to be fixing this at the application level. Probably doable, but not what I'm asking about. Thanks!