Questions tagged [fifo]

1

votes
1

answer
98

Views

how to read chunks from named pipe in bash

i have a command that potentially outputs a lot of data to stdout and I need to upload that via ftp to a remote location. I found this question Upload output of a program directly to a remote file by ftp and I really liked the idea of redirecting the output into a named pipe and then read junks from...
user3347114
1

votes
3

answer
1.9k

Views

Redirect stdout to fifo immediately

I have, for example, a c program that prints three lines, two seconds apart, that is: printf('Wait 2 seconds...\n'); sleep(2); printf('Two more\n'); sleep(2); printf('Quitting in 2 seconds...\n'); sleep(2); I execute the program and redirect it to a pipe: ./printer > myPipe On another terminal cat <...
Márcio Paiva
1

votes
1

answer
42

Views

FIFO with /dev/urandom

I got a problem. Trying to write a simple programm which forks once The parent proccess sends child bytes from /dev/urandom and child outputs them to screen (15 bytes in HEX per line). The problem is: when i first open the compiled programm the output looks like: B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0...
DrJoe
1

votes
0

answer
233

Views

VHDL using a FIFO with multidimensional data array

Good evening, I have a design where I am receiving 7 16-bit streams of data at 400Mhz. I need this data to be presented as 26 16-bit streams of data at 100Mhz. As it can be seen, I am receiving 28 16-bit streams of data at 100Mhz, which would result in more data constantly coming in then going out....
Trever Wagenhals
1

votes
1

answer
68

Views

How to analyze this FIFO program? [closed]

Here are some pieces of the program that completes FIFO buffer pool. I don't know how does it complete. Does anyone help me to analyze it? This is a struct of FlameHandle, this struct stores total flames, the first frame, and the last frame. typedef struct FlameHandle{ PageFlame *first; PageFlame *...
Junrui
1

votes
0

answer
217

Views

Direct connection FIFO to Zynq ARM

First of all I'm new in developing projects for FPGA WITH embedded ARM (or MicroBlaze) cores. My first project used transmitting a number of data to PS through FIFO. The main problem - I can't use DMA (it's blocked for other needs). As result I just connect few FIFO and Register to Zynq PS through A...
1

votes
1

answer
49

Views

g_io_channel and FIFO causes CPU to peg to 100%

I'm trying to understand why my CPU pegs to 100% when I use a FIFO in conjunction with g_io_channel. I have a project on github that demonstrates the problem with the smallest possible setup; just a simple server that opens a FIFO in /tmp, and a client that sends a message to the server via that FIF...
bp9
1

votes
3

answer
243

Views

Amazon::SQS::Simple MessageGroupId on a FIFO Queue

I need help on how to pass the MessageGroupId as parameter using the CPAN Module Amazon::SQS::Simple I tried the following : my $messageGroupId = 1; my $q = $sqs->GetQueue('http://queue.amazonaws.com/' . $queue_name); $q->{MessageGroupId} = $messageGroupId; $q->SendMessage($message); I also tried p...
Cadz
1

votes
1

answer
156

Views

When I cross data from a slow clock to a fast clock domain, wouldn't the stretched data be an issue for processing?

I want to use two fifo's asynchronously in series to cross from a slow-clock domain to a fast-clock domain. I have a slow clock (x MHz) that I need a multiple of (either 2x, 3x, 4x, or 6x). I won't have an issue with overflow on the first fifo since the next fifo will be set to a faster clock. Howev...
DeadSupra
1

votes
3

answer
259

Views

NRF24L01+ RX Mode and Flush

I have been trying to write my own code for NRF24L01+. I have a problem and I can not solve it As a receiver, I use STM32F103C8T6 and as a transmitter I use Arduino Uno. The problem is related to RX Operation. As I've mentioned above, As a receiver, I use STM32F103C8T6 and as a transmitter I use Ar...
PIC16F84A
1

votes
0

answer
78

Views

Scheduling strategy behind AWS Batch

I am wondering what the scheduling strategy behind AWS Batch looks like. The official documentation on this topic doesn't provide much details: The AWS Batch scheduler evaluates when, where, and how to run jobs that have been submitted to a job queue. Jobs run in approximately the order in which the...
lenawal
1

votes
0

answer
55

Views

BlockingCollection multiple consumers per group FIFO

I have a single producer that insert messages into a BlockingCollection. The messages in the collection each have a groupId. The count of different groupIds is dynamic. The messages per group must be processed in FIFO order. The work that the consumers do is a small calculation and a database insert...
mibiio
1

votes
1

answer
36

Views

Reliably reading from a FIFO in NodeJS

I'm writing a NodeJS script which interacts with a 3rd party application. The third party application will write data to a file for the duration that it's open. I'd like for my NodeJS application to receive this data in real-time. My script creates a fifo: child_process.spawnSync('mkfifo', [pipePath...
Joshua Walsh
1

votes
1

answer
35

Views

Which handle to pass to CreateIoCompletionPort, if using IOCP for basic signaling?

Background: As described in this article, Designing Applications for High Performance: Consider using PostQueueCompletionStatus rather than SetEvent API. The latter boosts the target thread’s priority by 1 which may cause it to preempt something else. I am working in C on Windows, and I'd like...
Lou
1

votes
0

answer
93

Views

Take only first json object from stream with jq, do not touch rest

This thread Split multiple input JSONs with jq helped me to solve one problem. But not other. mkfifo xxs exec 3xxs ## keep open file descriptor echo '{'a':0,'b':{'c':'C'}}{'x':33}{'asd':889}' >&3 jq -nc input
kyb
1

votes
1

answer
678

Views

Informix: Fifo valuation with SQL/Stored procedures

I am using IDS 10 and I have a simple transaction table with the inventory changes with product ID, transaction time, volume, quantity and price. Is it possible to determine the FIFO valuation solely with SQL/Stored procedures or do I need to use something like Perl with DBI for the cursor handling?...
weismat
1

votes
3

answer
507

Views

Java ConcurrentMap - Position of Key in Map

I have an interesting problem I would like some help with. I have implemented a couple of queues for two separate conditions, one based on FIFO and the other natural order of a key (ConcurrentMap). That is you can image both queues have the same data just ordered differently. The question I hav...
1

votes
2

answer
1.4k

Views

headache with named pipes and forks

I need to write program that have construction like this: Parent makes fifo, then fork() child 1 reads message from stdin and writes it to named pipe (FIFO) then in parent process I need to create pipe (unnamed) and another fork() child number 2 reades from FIFO, counts length of message and send nu...
lvp
1

votes
4

answer
1k

Views

FIFO Issue with concurrent processes

PRETEND THEY'RE NOT PARENT AND CHILD PROCESSES EVEN THOUGH THEY ARE. MAKE FIFO: /* Create response FIFO. */ if (mkfifo(RESP_FIFO_NAME, FIFO_MODE) == -1) { if (errno != EEXIST) { fprintf(stderr, 'Server: Couldn’t create %s FIFO.\n', RESP_FIFO_NAME); exit(1); } } Fork: /* 3. Fork the client process....
ICantNameMe
1

votes
2

answer
472

Views

an enclosing instance that contains Queue.Node is required

So I'm working on a Binary Search Tree and need to do a Level Order Traversal. I will be printing out all the keys that are on the same level. Problem I'm having right now is that I need to create a FIFO Queue. I have the Queue created but when I try to add the node to the queue I keep getting the a...
k3vy w3vy
1

votes
3

answer
466

Views

Linux select() and FIFO ordering of multiple sockets?

Is there any way for the Linux select() call relay event ordering? A description of what I'm seeing: On one machine, I wrote a simple program which sends three multicast packets, one to each of three different multicast groups. These packets are sent back-to-back, with no delay in between. I.e. se...
Matt
1

votes
1

answer
2.2k

Views

Bridge Unix domain socket with a FIFO and log file

I need to write a script - preferably a bash script - that will listen on a Unix domain socket and pipe the output to a log file while receiving input through a FIFO. The FIFO / log end is supposed to mimic the style of ii. The script also be able to monitor and react to the input from the FIFO (e.g...
AdamHovorka
1

votes
1

answer
2.1k

Views

FIFO page replacement algorithm problems

I am writing a program to find page faults using FIFO in C#. The user either provides a 20 character reference string or a random one is generated. The user also inputs the number of frames. So, I am passing in the array of 20 single digit numbers, array of frames, and # of frames to my FIFO functio...
user3015999
1

votes
2

answer
570

Views

Data Structure for FIFO Implementation When Getting ith Element

I want a data structure that will be fixed size and will work as FIFO. I mean if size exceeds the very first element will be removed. Also after each insertion I want to check the middle element at that structure (i.e. 10th element at size of 21) I consider to use ArrayDeque but Deque interface does...
kamaci
1

votes
1

answer
7.3k

Views

Verilog FIFO code written with different styles..one not working and another not working.Can someone explain

I have written verilog code for fifo using fillcount to check as the means for checking if it is full or empty. There are 2 versions of the same code. One is whereI have a seprate always always block for reading,writing,empty /full ,fillcount,and one for incrementing the pointers.This works fine,I h...
mjaju
1

votes
1

answer
151

Views

Alternative to the poll function to check new data in a FIFO

I'm writing a method to check if there is new data in a FIFO opened in RDONLY mode. Until now I was using the poll() function but I realized that the kernel on which the code will run doesn't have this function and it implements a subset of the Linux functionality and a subset of the POSIX functiona...
Nicola
1

votes
1

answer
249

Views

Multiple unix pipes not working

This first pipeline works fine (printing 'c'): echo 'a' | sed 's/a/b/' | sed 's/b/c/' This one does not do what I expect (nothing gets printed when I feed an 'a' into my fifo ): mkfifo fifo; cat fifo | sed 's/a/b/' | sed 's/b/c/' However, if I remove the second 'sed' command from the latter pipelin...
Sridhar-Sarnobat
1

votes
2

answer
2.9k

Views

work with fifo in c++ ( blocking read)

What I want to do : 1.Create and open for writing in.fifo by process1 2.Open in.fifo for reading in process2 3.Write from cin to in.fifo by process1 line 4.Read and cout line by process2 5.When input 'exit' to cin (process2), it closed file in.fifo, delete it and exit 6.process2 exit, because in....
fedden
1

votes
2

answer
2.8k

Views

How to implement a timeout in open/write function

I want to use named fifo channel and I want to implement a timeout when I write in this fifo. fd = open(pipe, O_WRONLY); write(fd, msg, len); Program is blocked by function open, so using the function select will not work. Thanks.
Kosterio
1

votes
1

answer
161

Views

Loss of data in a FIFO pipe?

I have a python process writing to a named pipe, and a C++ program reads it. (I create the pipes in C++). Well, it seems to work fine. However, sometimes I notice that there's loss of data. The data is not detected by the reader! Am I doing something wrong? Here's how I am creating the pipes: void c...
Luis Cruz
1

votes
1

answer
3.7k

Views

Reading/Writing a named pipe in Java? [duplicate]

This question already has an answer here: Not able to read from named pipe in Java 1 answer How do I read and write to a FIFO pipe using Java? Also, is the reading method blocking? I need to read a pipe and I need the program to wait until there's something in the pipe. Thanks in advance.
Luis Cruz
1

votes
1

answer
337

Views

Write data to FUSE named pipe

I've created a virtual filesystem that presents its outputs as read-only named pipes (i.e., S_IFIFO). As far as getattr is concerned, my host is showing that the permission mode is set correctly. However, when I attempt to open the pipe (e.g., cat my_fuse_mount/my_pipe), it apparently does so but no...
Xophmeister
1

votes
1

answer
131

Views

Starting fifo at the startup Linux fedora

I have been using fifos for controlling mpg123 player, there every-time I need to execute these 3 commands mkfifo a // create fifo cat > a & //to run it indefinately mypid=$! //assign some dummy pid I want to put this into some script which would execute it at the boot, i wrote a script containing t...
Kalu DADA
1

votes
1

answer
1.5k

Views

How do I flush a FIFO after reading it?

I have two executable, sender and receiver. receiver will fork 4 sender ( calling exec('sender') immediately after fork() ) and wait to receive data from each senders. ( the order of receiving data does not matter. ) sender: // executed by four different processes, forked from the `receiver` fifo_w...
Yun-Chih Chen
1

votes
2

answer
600

Views

CircularFIFOQueue : Using get method

I am trying to implement a CircularFifoQueue in java. Queue rssififo = new CircularFifoQueue(2); I am getting consfused on how to use the get method of the CircularFifoQueue API. The API states public E get(int index) Returns the element at the specified position in this queue. Parameters: index -...
srai
1

votes
1

answer
295

Views

FIFO receiving numbers (C code)

So I have a FIFO file that I made with mkfifo() function in terminal and I'm sending data with : echo'12.5 123 5 -2.1' > rndfifo My program needs to read those numbers and put them in a array so that I can use them later . I currently only succeeded in creating a program that reads those numbers an...
Nikola
1

votes
1

answer
2.1k

Views

How to write messages into a FIFO and read it from another process simultaneously

In Unix system, I just knew that we could use FIFO file for communication between two processes and I've tested it with C projects. Now I'm wondering if we can do something like this: Open two terminals. Use one to write messages into a FIFO and use the other to read it. When I put something into th...
Yves
1

votes
1

answer
299

Views

How to make a process ring with fork and mkfifo?

Currently I'm learning C and I'd like to make a ring of n childs process with forks and pipes where n is a number entered in argument. Each child could communicate with the next child in two directions like this: p1 --->--- p2 ------ p4 ---
Goolger
1

votes
2

answer
637

Views

open FIFO for write returns “No such device or address”

I want to create a server process and a client process -for an optional class assignment- and make them communicate with each other. The professor told us that: 1)we must use O_NONBLOCK 2)we must create 2 FIFOs, one for reading only and one for writing only 3)we can't use sockets So, I created 2 F...
Fotis Sk
1

votes
1

answer
138

Views

FIFO in While loop stucks and waits for read

Server sends its PID to client, client gets and sends SIGUSR1 signal in a loop, so i have handler for that in server code. In theory it needs to get signal and create some random matrix to client back.Client receives Server PID but it never sends matrix to client for some reason. It waits and inse...
opricnik

View additional questions