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
0
votes
3 answers

Syntax to Redirect to Input/Output to in C (UNIX)

I am trying to find the syntax that will let me redirect standard input output toward a named pipe after using the mkfifo() function and creating a child process using fork. Which man page should I be looking at for the syntax? Thanks, Aaron
CryptoJones
  • 734
  • 3
  • 11
  • 33
0
votes
0 answers

Creating a named FIFO using systemd-tmpfiles as non-root user

I want to create a named FIFO using systemd-tmpfiles as specified in the manual at tmpfiles.d | p,p+. I am able to create the fifo but the issue is with the user and group of that named fifo. Here is how I am defining it in conf file: p+ /run/reboot…
Rckzz
  • 29
  • 4
0
votes
0 answers

If multiple programs are reading from a FIFO, what guarantees are available in order-of-receipt?

Say I make a named pipe: mkfifo foo cat foo cat foo echo "stuff" > "$foo" is there any guarantee that the first call to cat will receive the data first?
user1604294
0
votes
0 answers

Python, use jinja2 to render .tex file, and then use fifo pipe to send to latex

I'm using jinja in python to render a .tex file, and then I want to use xelatex to render it to a pdf. Although I've managed to get this to work with an intermediate file, I'd rather not have an intermediate file. I want to try doing this with a…
Alex
  • 2,270
  • 3
  • 33
  • 65
0
votes
1 answer

QDataStream not initialized while reading buffer from ipc fifo file descriptor

I want to communicate between two application using fifo (ipc), I have created a fifo by "mkfifo MyPipe" command. first App: .... .... fd = open("MyPipe", O_NONBLOCK | O_WRONLY); QByteArray buf; QDataStream…
Panahi
  • 1
  • 2
0
votes
0 answers

Best way to communicate between 3 processes using named pipes and signals.

So my task is to communicate between 3 processes using signals and named pipes. It has to work like that for example : I want to close all programs and free resources of all processes, to do that I send SIGUSR1 to process B(for…
Michal
  • 23
  • 3
0
votes
1 answer

iOS mkfifo() operation not permitted

I have the following code which I call from a Swift main program in Xcode and when running it in the Simulator in a virtual iPhone for example, it works. It creates /tmp/MYFIFO. int32_t init_udpC(void) { static char *filename="/tmp/MYFIFO"; …
Krischu
  • 1,024
  • 2
  • 15
  • 35
0
votes
2 answers

Communication between processes - pipe and fifo

I need to create program with 3 processes: The first process should repeatedly read /dev/urandom and send 15 chars each cycle to the second process via a pipe. The second process should convert received data to hex and send the result to the third…
Michał
  • 43
  • 1
  • 7
0
votes
1 answer

Linux Named Pipes - MKFIFO query

i am fairly new in the named Linux BASH, named pipes etc. I am following an example from this article: https://www.linuxjournal.com/content/using-named-pipes-fifos-bash All works well and as expected. However this is only the beginning. I would…
0
votes
0 answers

Creation of multiple named pipes

I am trying to make a program that makes a number of children defined by the user. The parent must use named pipes (it is a requirement) to send information back and forth with his children. So, I need to create a number of named pipes equal to the…
Akaitenshi
  • 373
  • 2
  • 15
0
votes
0 answers

Unix: why I need to close the input FIFO to my program before I can read from its output FIFO

I've got a problem: I have one program running in a shell that does some calculations based on user input, and I can launch this program in an interactive way so it will keep asking for input and it outputs its calculations after user press enter.…
pippo
  • 774
  • 6
  • 10
0
votes
1 answer

unix fifo concurrent read from a named pipe leaves one of processes unterminated

I have created a fifo named pipe in solaris, which writes the content of a file, line by line, into pipe as below: $ mkfifo namepipe $ cat books.txt "how to write unix code" "how to write oracle code" $ cat books.txt >> namepipe & I have a…
naveen
  • 1
0
votes
0 answers

Wrapping executable that takes input and output files such that it uses stdin and stdout instead (using named pipes)

I'm trying to wrap an executable that takes an input and output file paths as arguments, such that it will be possible to provide the input and output as stdin and stdout. I've written a short script in Go that attempts to do this, but for some…
rikonor
  • 409
  • 1
  • 4
  • 15
0
votes
0 answers

Android JNI pipe always waiting in FileReader

I am trying to communicate with JNI with java using pipe I tried this. my JNI void createPipe(std::string path){ //pipe test const char* PATH = path.c_str(); char* line = "Hello Pipe!"; int pipe; int fd; errno = 0; …
CLIFFORD P Y
  • 16,974
  • 6
  • 30
  • 45
0
votes
1 answer

How to distinguish fifo openable vs readable content?

I'm a bit new to fifos on Linux and also have limited experience with select(). I've learned that calling open() on the read-end of a FIFO will block until the write end completes the pipe. One can open the read end of the fifo with O_NONBLOCK in…
StoneThrow
  • 5,314
  • 4
  • 44
  • 86