[libvirt] [PATCH] Ensure virExec preserves logging environment

Eric Blake eblake at redhat.com
Tue Nov 23 15:04:59 UTC 2010


On 11/23/2010 03:24 AM, Daniel P. Berrange wrote:
>> Should this function be changed to take a bool parameter for marking
>> logging fd's as cloexec?  Or, for that matter, should all logging fd's
>> always be cloexec in the first place?
> 
> Yes, everything libvirt does should be O_CLOEXEC really.

Agreed, but that means I need to revive some of my gnulib work to add
O_CLOEXEC to open(), as well as import pipe2() and other CLOEXEC-support
functions into libvirt, to make it faster on modern kernels.  That can
be set aside for another day (post 0.8.6).

>> In which case we wouldn't need this, because the fds would then
>> automatically avoid leaking?
> 
> I prefer to be paranoid about closing FDs even if we believe
> they are all O_CLOEXEC already.

Fair enough.  At any rate, your patch looks fine as is;

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101123/1312b3e7/attachment-0001.sig>


More information about the libvir-list mailing list