spawn: another cleanups in spawn_and_give_stdout()