[Process] Added support for stdout and stderr flush (Issue #7884)