Questions tagged [mkfifo]

Creates a named-pipe (aka FIFO)

A named pipe, also called a FIFO for its behaviour, can be used to connect two unrelated processes and exists independently of the processes; meaning it can exist even if no one is using it. A FIFO is created using the mkfifo() library function.


What is considered related processes?

Probably processes which are related via one or more parent/child relations (e.g. includes siblings). The common ancestor would have created the two ends of the pipe. Unrelated processes lack that common ancestor.

229 questions
1
vote
1 answer

mkfifo command failing on clearcase vobs

I am trying to create named pipe in a directory which is created under clearcase's vobs tree (/vobs/something/something) but not checked-in. I am getting this error: "mkfifo: No such device or address" I am not able to understand why pipe creation…
dvai
  • 1,953
  • 3
  • 13
  • 15
1
vote
1 answer

Write to fifo file

I've created a file by using mkfifo /tmp/my.fifo. I now want to write chars into the file (with Objective C) to be able to grab them by tail -f /tmp/my.fifo. For some reason this does not work. The tail command only displays one character, and then…
gorootde
  • 4,003
  • 4
  • 41
  • 83
1
vote
1 answer

FIFOS between PHP and C

I want to communicate 2 process using FIFOS. One process is writting in C and the other in PHP. The problem is that if I use FIFOS, the writer blocks until the reader open the FIFO, and the same in the other direction. I explain it better, I have a…
user2992269
1
vote
0 answers

Linux: is there a way to use named fifos on the writer side in non-blocking mode?

I've found many questions and answers about pipes on Linux, but almost all discuss the reader side. For a process that shall be ready to deliver data to a named pipe as soon as the data is available and a reading process is connected, is there a way…
Zrin
  • 919
  • 15
  • 25
1
vote
1 answer

Create several named pipes (fifo) depending on input file content

This awk script splits one log file into some smaller files: #!/bin/awk -f /topic = / { topic = $NF } / : / { print $3 >> topic "___" $1 } # $1 is the field name An input file example: topic = foo A : 23 BB : Text1 Zz : 77 topic = bar A …
oHo
  • 51,447
  • 27
  • 165
  • 200
1
vote
1 answer

Why Klocwork complains that S_IRWXU is an int?

Here is the code: char path = "/temp/abc"; if (mkfifo(path, S_IRWXU) != -1) { /* Other codes. */ } For the if check, I got Klocwork misra: Operand of bitwise operation has type 'int' instead of 'unsigned integer' And at the same line, lint…
Mengfei Murphy
  • 1,049
  • 3
  • 11
  • 16
1
vote
1 answer

How do I detect that a fifo has been deleted in Python

In Python, I can poll for incoming data on a fifo (created with the Linux mkfifo command) with: reader = open(known_fifo_name,"r") while True: data = reader.read(1) if data: process(data) else: time.sleep(0.1) #no data now, try…
AShelly
  • 34,686
  • 15
  • 91
  • 152
1
vote
1 answer

using mkfifo to block on read until a write

gcc (GCC) 4.7.2 c89 I am using pipes mkfifo. I have a reader and a writer. I want the reader to block until there is something in the file. There is a flag you can set O_NONBLOCK which is for non-blocking mode. So by default it should block on the…
ant2009
  • 27,094
  • 154
  • 411
  • 609
1
vote
1 answer

gunzip with mkfifo in bash

I am trying to gunzip a file and then keep the results in a named pipe created using mkfifo which will ultimately be used in a join command. I have seen many examples on using mkfifo to gzip things but almost nothing on gunzipping in this type of…
gjw80
  • 1,058
  • 4
  • 18
  • 36
1
vote
2 answers

FIFOs in C (Named-pipes)

I'm getting permission errors when trying to mkfifo() in the current directory. I definitely have permission to create files here. Any idea what the problem could be? char dir[FILENAME_MAX]; getcwd(dir, sizeof(dir)); for(i = 0; i
Zach Kauffman
  • 486
  • 1
  • 4
  • 17
0
votes
1 answer

FIFO server program

The above program i have typed in linux. It basically has to connect a client and server in separate terminals. But when i run them in the correct order, i.e Compile server -> run server Compile client - > run client The terminals just dont do…
footy
  • 5,803
  • 13
  • 48
  • 96
0
votes
1 answer

Comunication between Host and Docker Container using FIFO pipes by bind mount (Linux)

My container creates fifo pipe in the bind mounted dir but container when reads or writes to this pipe, the host cant receive it or vice versa. with similar permissions to create or open pipe works for communication within host and within container.…
0
votes
1 answer

How to detect first-in first-out special file (named pipe) with dotnet?

I'd like to identify files that are first-in first-out special file (named pipe) on Linux with dotnet Here is a kind of file returned by ls: $ ls -al /home/xxxxxx/.mkmkmmkk/sdfsdf.pipe prw------- 1 xxxxxx xxxxxx 0 4 nov 2018…
manuc66
  • 2,701
  • 29
  • 28
0
votes
0 answers

Unable to send or receive data via a FIFO in C

I'm workng on a C program with which I'd like to implement a scenario when a parent and two children processes are communicating with each other. A child should send a real-time signal to the parent. That's not a problem. However, in case the parent…
curiousMind_85
  • 167
  • 1
  • 8
0
votes
0 answers

Refactoring code to use epoll instead of signal handlers

I have some very basic code, here that creates two NAMED pipes, one for a handler and another for an execuetor. Now I have a partially implemented signal handler, that handles signals from the pipes How would I go about refactoring this to use…