Skip to content

Commit 304a4c0

Browse files
committed
libct: createExecFifo: rm unneeded os.Stat
In case file already exists, mknod(2) will return EEXIST. This os.Stat call was (inadvertently?) added by commit 805b8c7. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 349e5ab commit 304a4c0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

libcontainer/container_linux.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,6 @@ func (c *Container) createExecFifo() error {
417417
}
418418

419419
fifoName := filepath.Join(c.stateDir, execFifoFilename)
420-
if _, err := os.Stat(fifoName); err == nil {
421-
return fmt.Errorf("exec fifo %s already exists", fifoName)
422-
}
423420
if err := unix.Mkfifo(fifoName, 0o622); err != nil {
424421
return &os.PathError{Op: "mkfifo", Path: fifoName, Err: err}
425422
}

0 commit comments

Comments
 (0)