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

Is it possible to create and use FIFO file in iOS? (ObjC)

I want to use good old FIFO to pass data to another part of my own iOS application. I looked at dispatch_io_create_with_path but I want the other side to be able to read data with plain read(). Is it possible to use FIFO file? how? I tried next code…
gheni4
  • 273
  • 3
  • 16
1
vote
2 answers

babel-watch doesn't work from docker container on windows host when mounting a host directory as a network share

I'm using docker on Windows and my src directory is mounted as a network share inside the docker container (as opposed to COPY). So /var/app/server inside the docker is actually a network share whose actual location on my host is…
laggingreflex
  • 32,948
  • 35
  • 141
  • 196
1
vote
1 answer

Named pipes how to identify client

Supose i have a server that creates captcha images on request. Clients comunicate with the server via named pipes with a 6 chat word and an ID. Server creates the image and send it to the client via named pipes too. Client has the function…
1
vote
1 answer

using FIFOs for input and output in python

To communicate with a shell, which is started once and runs in a separate process, I used Popen from subprocess. import os from subprocess import Popen, PIPE def server(): FIFO_PATH = '/tmp/my_fifo' FIFO_PATH2 = '/tmp/in_fifo' if…
Maori
  • 17
  • 1
  • 1
  • 7
1
vote
0 answers

How can I use pipes (FIFO) with my program in bash scripts?

What I try to do: Create a pipe (FIFO). Redirect output of the pipe to the stdin (&1). Redirect input of the pipe to the 4th descriptor (&4). Run my program (it should copy it's parent descriptors, pointing to my pipe). Write something to &4 (FIFO…
Jecke
  • 239
  • 2
  • 13
1
vote
1 answer

listening to fifo without busy waiting in linux (C linux)

I've created a FIFO (with mkfifo()) and I need to wait till some process writes data several times into it. I've written the following code: (ignore the bad style, it's to keep the example concise) int count = 0, read = 0; while(count < 2) { …
sel
  • 483
  • 5
  • 16
1
vote
1 answer

How to read() from clients and a FIFO using select() in C

I read() from clients connected to the server, and at the same time, I let select() be aware of data coming from a FIFO. Right now, when data is written to the FIFO, selects writes all data to the clients but keeps returning as if it was…
Pete Darrow
  • 455
  • 5
  • 20
1
vote
1 answer

Can git repository not include unix named fifo?

I think I know the answer to this, from experimentation, but my googling has found nothing definitive about it. So I'm looking for clarification. Consider cd GitDirectory mkfifo _my_named_pipe git add _my_named_pipe git status The status command…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
1
vote
0 answers

Connection between group of daemons and main process - mkfifo

I was trying to connect daemons (group of daemons without a leader) with main process as in title, the problem is that i have to send statement from each daemon(which are supporting SIGUSR1 signal) to main process, but i don' t even know how to do…
Jorgusss
  • 7
  • 1
  • 3
1
vote
1 answer

GTKMM Monitoring I/O example 100% CPU load

I am trying the Gtkmm Monitoring I/O example from here. After something has been written to the fifo, the CPU load goes to 100%. The code as shown in the example link is the code I used for testing (copy / paste), I only removed the build.config.h…
sanne
  • 111
  • 8
1
vote
0 answers

Linux non-blocking FIFO write() inconsistent timing

We've got a real-time linux user application which communicates with another application running on the same host via mkfifo() FIFOs. Our application consists of 4 pthreads, and one of these creates and opens the FIFOs. The FIFOs are opened in…
matth1j
  • 31
  • 5
1
vote
1 answer

Loop fails to continue looping

I was working on some code to create a new folder everytime a specific FIFO is written to: int main (int argc, char* argv[]) { if (argc != 2) { printf("Usage: %s \n",argv[0]); exit(0); } int ret = chdir(argv[1]); if (ret < 0) { …
Tookmund
  • 103
  • 1
  • 7
1
vote
1 answer

Not all messages written to FIFO received on read

I've got a strange problem when working with fifo files in C under linux. Let's begin with the code: #include #include #include #include #include #include #include int…
1
vote
1 answer

what can cause an infinite loop when using open? (C, UNIX)

I created a fifo using this: mkfifo("myfifo", 0666); Now, I want to open it using inf fd = open("./myfifo",O_WRONLY); but that sends me to an infinite loop, why?
CIsForCookies
  • 12,097
  • 11
  • 59
  • 124
1
vote
0 answers

Reading from a named pipe (and then stopping)

I am trying to get two fortran programs to communicate through a named pipe but the reading program is hanging. My command look like this: > mkfifo /tmp/myfifo > ./app/fortw /tmp/myfifo & > ./app/fortr /tmp/myfifo where fortw prints the numbers 1…
paco_uk
  • 445
  • 1
  • 5
  • 15