support end of child_process stream