Browse code

Use proper wait function for --pid=host

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/03/31 05:27:38
Showing 1 changed files
... ...
@@ -162,7 +162,7 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
162 162
 		logrus.Warnf("Your kernel does not support OOM notifications: %s", err)
163 163
 	}
164 164
 	waitF := p.Wait
165
-	if nss := cont.Config().Namespaces; nss.Contains(configs.NEWPID) {
165
+	if nss := cont.Config().Namespaces; !nss.Contains(configs.NEWPID) {
166 166
 		// we need such hack for tracking processes with inerited fds,
167 167
 		// because cmd.Wait() waiting for all streams to be copied
168 168
 		waitF = waitInPIDHost(p, cont)