Remove pipe close before exec.

Pipe close before exec is not necessary as os.Pipe() is calling pipe2
with O_CLOEXEC option.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
Marco Vedovati 2018-08-10 11:23:30 +02:00 committed by Danail Branekov
parent 9a599f62fb
commit feebfac358
1 changed files with 0 additions and 5 deletions

View File

@ -16,7 +16,6 @@ import (
"github.com/opencontainers/runc/libcontainer/system"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
@ -208,10 +207,6 @@ func (l *linuxStandardInit) Init() error {
return newSystemErrorWithCause(err, "init seccomp")
}
}
logPipe, _ := (logrus.StandardLogger().Out).(*(os.File))
logPipe.Close()
if err := syscall.Exec(name, l.config.Args[0:], os.Environ()); err != nil {
return newSystemErrorWithCause(err, "exec user process")
}