Generic, reusable stdin/stdout/stderr proxy code, with hook points for multiple consumers, and support for inline permutation.
See proxy.h
for the API, and main.c
for a demo.
The included example program prints out a message any time input or output is received/sent.