[Libguestfs] [PATCH] launch: Close file descriptors after fork (RHBZ#1123007).

Pino Toscano ptoscano at redhat.com
Fri Jul 25 15:19:25 UTC 2014


On Friday 25 July 2014 14:07:27 Richard W.M. Jones wrote:
> This refactors existing code to close file descriptors in the recovery
> process, and also adds code to close file descriptors between the
> fork() and exec() of QEMU or User-Mode Linux.
> 
> The reason is to avoid leaking main process file descriptors where the
> main process (or other libraries in the main process) are not setting
> O_CLOEXEC at all or not setting it atomically.  Python is a
> particular culprit.
> 
> See also this OpenStack Nova bug report:
> https://bugs.launchpad.net/nova/+bug/1313477
> 
> Thanks: Qin Zhao for identifying and characterizing the problem in
> Nova.

LGTM.

-- 
Pino Toscano




More information about the Libguestfs mailing list