Don't allow creation of fifo when opening since it should already exist Change-Id: Ieb486d882f89daea1d6d48bc46c0006e7ff04a68
diff --git a/src/emit.c b/src/emit.c index 92e8c96..61d09cc 100644 --- a/src/emit.c +++ b/src/emit.c
@@ -63,7 +63,7 @@ { const char *fifo = mygetenv(ENV_FIFO_PATH); assert(fifo); - if ((write_fd = open(fifo, O_CREAT | O_WRONLY)) < 0) { + if ((write_fd = open(fifo, O_WRONLY)) < 0) { error("emitInit failed to open %s", fifo); return -1; }
diff --git a/src/unix/proc.c b/src/unix/proc.c index 5eb8d3b..e706d9b 100644 --- a/src/unix/proc.c +++ b/src/unix/proc.c
@@ -193,7 +193,7 @@ size_t sz; char c; - const int fd = open(fifo, O_CREAT | O_RDONLY); + const int fd = open(fifo, O_RDONLY); if (fd < 0) { error("failed to open fifo %s for read"); return ERR_PROC_UNKNOWN;