[Libguestfs] [PATCH v2] launch: Close file descriptors after fork (RHBZ#1123007).
Pino Toscano
ptoscano at redhat.com
Thu Jul 31 08:22:07 UTC 2014
On Wednesday 30 July 2014 14:28:22 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.
>
> This is version 2 of this commit. This commit is identical to the
> reverted commit 115fcc34325f965ac3723683e4462fc667dcd254 except that
> we don't close stderr.
LGTM.
--
Pino Toscano
More information about the Libguestfs
mailing list