allow subprocess output to trigger flush

only affects the case of an idle kernel.

This treats subprocess output the same as background thread output.
Merge pull request #5820 from minrk/subprocess-flush

allow subprocess output to trigger flush