]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Use VIR_MASS_CLOSE in LXC container startup
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 16:39:33 +0000 (16:39 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 18:10:36 +0000 (18:10 +0000)
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 <berrange@redhat.com>
src/lxc/lxc_container.c

index 497539c8740b31329321d4647396b39dde533c2e..7ec67f43a901c61050571df750b2e95fa3b7ad13 100644 (file)
@@ -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) {