Fix a read error on some fds in pipeline.