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

Not able to give input to my telnet connection through fifo file if I run it from script

I have a python script which is sending commands to a fifo file through this command. printf "command" > my1.fifo An another process (telnet login) is taking input from this my1.fifo file. The python script analyses the output of telnet connection…
Anubhav Rai
  • 11
  • 1
  • 4
0
votes
0 answers

Read Write Issue in Named Pipes on CentOS 7

I am new in NamedPipe concept on Linux/Centos 7. I want to implement read write funtions between my Windows and CentOS PC using NamedPipe. I have created a NamedPipe on CentOS PC using mkfifo function and written some text on this pipe. On other…
0
votes
1 answer

Streaming data to/from file in browser

Is there an API in the browser (outside of websockets) which allows us to stream data from a file to the browser? something like this: const reader = new FileReader(); reader.readAsText(file, "UTF-8"); reader.on('data', d => { //…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
0
votes
1 answer

get updated variable value from subshell

I hava a main shell, during its running, I need to call a function (update_bk) in the background. the purpose of this function is to update a variable (VarA) which will be used by main shell later. I know if I call update_bk function in background,…
seanlv
  • 13
  • 3
0
votes
0 answers

How do i change process relations from PIPE to FIFO?

There is a task: Write a program to calculate the sum of matrix elements. The matrix is entered from a file. The calculation of the sums of the elements of each row is performed in separate processes. To transfer data to the parent process, use the…
0
votes
0 answers

fifo plot signal python with time-series data

I have a problem with the xmgrace visualization. I have created the fifo which will store the data to be able to do real time series. The problem is that the fifo archive contains all 3 signals and as I run the commands in the terminal I can't find…
0
votes
0 answers

Blocking pipe read in C++

I'm trying to communicate two processes via Named pipes but I'm having problems with the reader process. The idea is that the consumer reads several messages that the producer writes into the pipe in random periods. Since these periods can be long,…
Francesc Lordan
  • 519
  • 4
  • 24
0
votes
0 answers

Streaming ffmpeg from fifo file starts only when i close the fifo file

Im starting an ffmpeg process, where the input is a FIFO file i created. Im writing some data in a loop to the FIFO file, but the ffmpeg process doesn't start streaming until one of the two happens: i'm closing the file iv'e written a certain…
tamirg
  • 607
  • 1
  • 7
  • 15
0
votes
1 answer

Named pipes for client-server simulation in 2 terminals

I know the title doesn't explain the problem precisely and I apologize. I've been writing a program in C of named pipes and the goal of it is to open 2 windows of the terminal, each running either the "Server" or the "Client" file. After the…
Chefi
  • 41
  • 4
0
votes
1 answer

How to keep program unclosed after ctr+c in named pipe?

I have 2 programs. One is server one is client. The Client sending string to the server, the server is swapping the string and return to the client. the problems I have is when I pressing ctr+c the program(client) closed.(I'm using threads because …
user17712660
0
votes
0 answers

Linux C use mkfifo file descriptor with select

I'm planing to monitor the fifo and stdin with select function, but it always block the code flow even though O_NONBLOCK is configured, would anyone help check about it please ? I'm not sure it's the code issue or solution is not a right direction…
whisper
  • 95
  • 1
  • 6
0
votes
0 answers

How to append into a named pipe without changing the value stored previously (linux)(named pipes)

I am creating 10 children to one parent. I want all the children to write into a pipe appending the pipe, so I can then read the collective data later in the parent. So first child writes into the pipe "9-6" then the second child writes "9-6" making…
0
votes
0 answers

Python named pipes - running 2 apps through each other

Very new to python and named pipes! I am trying to run an GUI and a motion tracking application at the same time - and send the motion tracking application output (CSV) to the GUI script to synchronise the two data streams. Using a named pipe, how…
0
votes
0 answers

How to send properly data in fifo server

I am trying to create a simple fifo client/server. Whenever I compile the program and try to type some data in client, in server I am getting weird outputs such as: How can I fix this? server: #include #include #include…
Dave
  • 1
  • 1
  • 9
  • 38
0
votes
0 answers

Not able to pass strings through named pipes (FIFOs) in multithreaded processes

I am trying to use 'FIFOs' and 'popen()' function for communication between multiple processes. Also, the first process is multithreaded for reading and writing operations. Following is the C code for the processes: P1 process (Q1.c) #include…