"Daniel P. Berrange" <berrange(a)redhat.com> wrote:
With my recent patches to virExec(), all FDs except stdin/out/err are
closed
before the child is exec'd to prevent accidental leaks. Of course I forgot
the one key place where we need to propagate FDs... The TAP devices passed
to QEMU.
This patch adds a 'keepfd' parameter to virExec() which allows the caller
to specify a bitset of file descriptors to keep open, and updates the
callers to use this as required. The QEMU driver specifies any TAP fds
and the LXC driver specifies its PTY this way removing a previous hack.
This all looks fine, assuming you're adjusting it to use the
standard "fd_set" type.