mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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 805b8c73.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -417,9 +417,6 @@ func (c *Container) createExecFifo() error {
|
||||
}
|
||||
|
||||
fifoName := filepath.Join(c.stateDir, execFifoFilename)
|
||||
if _, err := os.Stat(fifoName); err == nil {
|
||||
return fmt.Errorf("exec fifo %s already exists", fifoName)
|
||||
}
|
||||
if err := unix.Mkfifo(fifoName, 0o622); err != nil {
|
||||
return &os.PathError{Op: "mkfifo", Path: fifoName, Err: err}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user