On 12.07.2013 17:38, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> > > Wire up the new virDomainCreate{XML}WithFiles methods in the > LXC driver, so that FDs get passed down to the init process. > > The lxc_container code needs to do a little dance in order > to renumber the file descriptors it receives into linear > order, starting from STDERR_FILENO + 1. > > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> > --- > src/lxc/lxc_container.c | 136 +++++++++++++++++++++++++++++++++++++---------- > src/lxc/lxc_container.h | 6 ++- > src/lxc/lxc_controller.c | 36 +++++++++++-- > src/lxc/lxc_driver.c | 45 +++++++++++++--- > src/lxc/lxc_process.c | 16 +++++- > src/lxc/lxc_process.h | 1 + > 6 files changed, 197 insertions(+), 43 deletions(-) > > @@ -853,6 +856,12 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver, > virCommandPreserveFD(cmd, ttyFDs[i]); > } > > + for (i = 0; i < nfiles; i++) { > + virCommandAddArg(cmd, "--passfd"); > + virCommandAddArgFormat(cmd, "%d", files[i]); > + virCommandPreserveFD(cmd, files[i], 0); How does this even compile? s/, 0// > + } > + > virCommandAddArgPair(cmd, "--security", > virSecurityManagerGetModel(driver->securityManager)); > Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list