Skip to content
Permalink
Browse files

Delete any existing files in pipe before mkfifo

  • Loading branch information
tatokis committed Nov 24, 2019
1 parent edef4ed commit 71d5222890e02223fdfa474eda2e98d175d81a5a
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/animations/pipe/main.c
@@ -43,6 +43,7 @@ void ckb_init(ckb_runctx* context){
void ckb_parameter(ckb_runctx* context, const char* name, const char* value){
CKB_PARSE_LONG("fifonum", &fifonum){
sprintf(fifoname, "/tmp/ckbpipe%03hhu", (unsigned char)fifonum);
unlink(fifoname);
// Create named pipe in tmp
mkfifo(fifoname, 0600);
fd = open(fifoname, O_RDONLY | O_NONBLOCK);

0 comments on commit 71d5222

Please sign in to comment.
You can’t perform that action at this time.