I would like to change bio to do all I/O through a user replaceable function. The attached patch does just that, adding a new function Biofn() to register such a function, which replaces read/write. Main uses I have in mind: 1. Allow programs to flush output buffers before stalling for more input, which would most likely be activated with a command line flag. 2. Use bio with things that are not file descriptors. 3. Apply filters to input/outputs (arguably could also be done with pipes). 4. Use bio with ioprocs.