Skip to main content

Questions tagged [mkfifo]

-1 votes
1 answer
100 views

Serving a file (e.g. in Apache) from a named pipe (made with mkfifo)

Let's say I use Apache, and that I am in /var/www/html/. I do: mkfifo test.tar tar cvf - ~/test/* > test.tar & In a browser, when trying to download http://localhost/test.tar I get: ...
Basj's user avatar
  • 2,609
5 votes
2 answers
628 views

Can I use named pipes to achieve temporal uncoupling?

I have 2 applications that pipe their data: application1 | application2 Basically, application1 generates a log with events that application2 processes. The issue is that I frequently update ...
Ramon Smits's user avatar
7 votes
1 answer
709 views

FIFO capture using cat not working as intended?

Hi I am trying to use a Unix FIFO to communicate between a Python script and a shell script. The intention is for the shell script to capture all output of the python script. So far I have the ...
First User's user avatar
-1 votes
3 answers
233 views

Empty named pipe

I try to create a named pipe, however, when I store data in it, it is still empty. $ mkfifo myfifo $ cat > myfifo 123 123 123 ^[[D ^C $ ls > myfifo ^C $ cat < myfifo (no output)
Irina's user avatar
  • 131
0 votes
1 answer
426 views

Setting large fs.pipe-max-size

When I increase fs.pipe-max-size like so: echo "fs.pipe-max-size = N" >> /etc/sysctl.conf sysctl -p (N is ~4-10Mbytes) And use F_SETPIPE_SZ to change named pipe sizes to N, sometimes ...
JAre's user avatar
  • 125
0 votes
0 answers
46 views

Strange incongruent output for both nc and fifo

I have this exact code: #!/bin/bash gtimeout(){ if type -f gtimeout &> /dev/null; then command gtimeout "$@" else timeout "$@" fi } export -f gtimeout; ...
Alexander Mills's user avatar
1 vote
0 answers
275 views

Unable to redirect stdout for background terraform process after it received input from named pipe

I have a terraform file: terraform { required_version = "1.3.5" } locals { a = "foo" b = "bar" } in a bash terminal, I can do: $ echo "local.a" | ...
Foo's user avatar
  • 242
1 vote
1 answer
198 views

Speed up grep usage inside bash script

I am currently working on creating a bash script that is supposed to process large log files from one of my programs. When I first started the script took around 15 seconds to complete which wasn't ...
Dzamba's user avatar
  • 11
1 vote
1 answer
314 views

Process (mplayer) doesn't read from named pipe when started from webserver (lighttpd)

tl;dr $ sudo -u www-data mplayer -slave -input file=/srv/mplayer.fifo -playlist /srv/list & $ lsof /srv/mplayer.fifo | tail +2 mplayer 21059 www-data 4u FIFO 179,2 0t0 2359331 /srv/...
steffen's user avatar
  • 121
0 votes
1 answer
623 views

Adding 'Progress bar / counter' to a parallelised For Loop

I've been greatly inspired by this question: Parallelize a Bash FOR Loop to parallelise some tools I've written that involve very loooong while read loops (ie doing the same task / set of tasks ...
user avatar
0 votes
1 answer
532 views

How to guarantee that that only a specific process reads from a named pipe?

Suppose that, at time (1), I create a named pipe using Python with the goal that eventually this Python process would write something to that named pipe. Why? Because, at time (2), there is another ...
caveman's user avatar
  • 173
3 votes
1 answer
1k views

How to pipe all output streams to another process?

Take the following Bash script 3-output-writer.sh: echo A >&1 echo B >&2 echo C >&3 Of course when ran as . 3-output-writer.sh it gets the error 3: Bad file descriptor, because ...
Sinus tentaclemonster's user avatar
2 votes
2 answers
81 views

Process in Pipe which Processes 256 bytes at a Time

I have a c program on a Cyclone 5 that does an FFT using the connected FPGA. This program currently takes 256 bytes from stdin and then process it gives the FFT results on stdout. I run it like this ...
Flying Swissman's user avatar
2 votes
1 answer
220 views

Using tee and paste results in a deadlock

I am trying to redirect stdout of a command into two "branches" using tee for separate processing. Finally I need to merge results of both "branches" using paste. I came up with the following code for ...
HollyJolf's user avatar
0 votes
1 answer
65 views

Why don't named pipes respect the order at which readers were attached?

I have this test script: #!/usr/bin/env bash fif="foooz"; rm "$fif" ; mkfifo "$fif" ( cat "$fif" | cat && echo "1") & sleep 0.1 ( cat "$fif" | cat && echo "2") & sleep 0....
Alexander Mills's user avatar

15 30 50 per page