From 82fd577d48c33b992b279f008091a1c9472e3cb5 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Sun, 10 Oct 2021 17:57:36 +0200 Subject: [PATCH] remove any existing named pipe before creating a new one --- src/scripts/jsonrpc2-helper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/jsonrpc2-helper.go b/src/scripts/jsonrpc2-helper.go index 1491072..242ab49 100644 --- a/src/scripts/jsonrpc2-helper.go +++ b/src/scripts/jsonrpc2-helper.go @@ -49,6 +49,9 @@ func main() { tcpPort := tcpBasePort + ctr jsonRpc2ClientConfig.AddEntry(number, utils.ConfigEntry{TcpPort: tcpPort, FifoPathname: fifoPathname}) ctr += 1 + + os.Remove(fifoPathname) //remove any existing named pipe + _, err = exec.Command("mkfifo", fifoPathname).Output() if err != nil { log.Fatal("Couldn't create fifo with name ", fifoPathname, ": ", err.Error())