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:
Kir Kolyshkin
2024-05-06 17:43:25 -07:00
parent 349e5ab7c1
commit 304a4c0fee
-3
View File
@@ -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}
}