This is a small LD_PRELOAD library that will direct stdout and stderr to /dev/null for specified executables by name.
Example usage (assuming libstfu.so is in LD_LIBRARY_PATH, otherwise must give a path to libstfu.so):
STFU_EXE=someloudprogram LD_PRELOAD=libstfu.so someprogramthatexecutessomeloudprogram
Multiple targets can be specified by separating with colons:
STFU_EXE=someloudprogram:anotherloudprogram LD_PRELOAD=libstfu.so someprogramthatexecutesthem
Pull requests are welcome.
Libstfu is licensed under the 3-Clause BSD License.
Thanks to @mikroskeem for implementation in pseudocode.