Skip to content

Commit e4ca720

Browse files
marcovgeorgethebeatle
authored andcommitted
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> Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
1 parent 8e8a907 commit e4ca720

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

libcontainer/standard_init_linux.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/opencontainers/runc/libcontainer/system"
1717
"github.com/opencontainers/selinux/go-selinux/label"
1818
"github.com/pkg/errors"
19-
"github.com/sirupsen/logrus"
2019

2120
"golang.org/x/sys/unix"
2221
)
@@ -208,10 +207,6 @@ func (l *linuxStandardInit) Init() error {
208207
return newSystemErrorWithCause(err, "init seccomp")
209208
}
210209
}
211-
212-
logPipe, _ := (logrus.StandardLogger().Out).(*(os.File))
213-
logPipe.Close()
214-
215210
if err := syscall.Exec(name, l.config.Args[0:], os.Environ()); err != nil {
216211
return newSystemErrorWithCause(err, "exec user process")
217212
}

0 commit comments

Comments
 (0)