summaryrefslogtreecommitdiff
path: root/pkg/libcontainer/nsinit/execin.go
diff options
context:
space:
mode:
authorunclejack <unclejack@users.noreply.github.com>2014-03-26 00:00:37 +0200
committerunclejack <unclejack@users.noreply.github.com>2014-03-26 00:00:37 +0200
commit867b2a90c228f62cdcd44907ceef279a2d8f1ac5 (patch)
treea41c506d3adefe00861f9e38155f5b21e1692ab4 /pkg/libcontainer/nsinit/execin.go
parent143c9707a9fafc39e1d9747f528db97b2564f01e (diff)
parent3600720a36929b1a51a227699a337cc593e2534d (diff)
downloaddocker-release-0.9.tar.gz
Merge pull request #4831 from unclejack/final_bump_v0.9.1v0.9.1release-0.9hotfix-0.9.2
Bump to version 0.9.1
Diffstat (limited to 'pkg/libcontainer/nsinit/execin.go')
-rw-r--r--pkg/libcontainer/nsinit/execin.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/libcontainer/nsinit/execin.go b/pkg/libcontainer/nsinit/execin.go
index 488fe0e248..628854ff32 100644
--- a/pkg/libcontainer/nsinit/execin.go
+++ b/pkg/libcontainer/nsinit/execin.go
@@ -14,9 +14,12 @@ import (
// ExecIn uses an existing pid and joins the pid's namespaces with the new command.
func (ns *linuxNs) ExecIn(container *libcontainer.Container, nspid int, args []string) (int, error) {
- for _, ns := range container.Namespaces {
- if err := system.Unshare(ns.Value); err != nil {
- return -1, err
+ for _, nsv := range container.Namespaces {
+ // skip the PID namespace on unshare because it it not supported
+ if nsv.Key != "NEWPID" {
+ if err := system.Unshare(nsv.Value); err != nil {
+ return -1, err
+ }
}
}
fds, err := ns.getNsFds(nspid, container)