On 03/11/2011 08:39 AM, Laine Stump wrote:
> path, mode);
> goto childerror;
> }
> - if (flags& VIR_FILE_OP_RETURN_FD) {
> + {
> VIR_FORCE_CLOSE(pair[0]);
This VIR_FORCE_CLOSE(pair[0]) should be moved up to the very start of
the child code - otherwise any error prior to this point will leave it
dangling for _exit() to clean up.
Well, _exit() is guaranteed to close fds, so I was being a bit lazy in
the child :) But I'll go ahead and rearrange this.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org