lib/process: Allow process output to be retrieved on each event