From: Daniel P. Berrange Date: Thu, 7 Mar 2013 16:39:33 +0000 (+0000) Subject: Use VIR_MASS_CLOSE in LXC container startup X-Git-Tag: v1.0.4-rc1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58e0accd8af7d0b7b9066c950f736396d0f7a129;p=thirdparty%2Flibvirt.git Use VIR_MASS_CLOSE in LXC container startup In the LXC container startup code when switching stdio streams, we call VIR_FORCE_CLOSE on all FDs. This triggers a huge number of warnings, but we don't see them because stdio is closed at this point. strace() however shows them which can confuse people debugging the code. Switch to VIR_MASS_CLOSE to avoid this Signed-off-by: Daniel P. Berrange --- diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 497539c874..7ec67f43a9 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -245,7 +245,7 @@ static int lxcContainerSetStdio(int control, int ttyfd, int handshakefd) for (i = 0; i < open_max; i++) if (i != ttyfd && i != control && i != handshakefd) { int tmpfd = i; - VIR_FORCE_CLOSE(tmpfd); + VIR_MASS_CLOSE(tmpfd); } if (dup2(ttyfd, 0) < 0) {