The tag has no wiki summary.

learn more… | top users | synonyms (1)

16
votes
1answer
251 views

Why is a named pipe as slow as writing to a file?

I'm trying to understand how named pipes work so that I can streamline my one-way interprocess communication. I expect some overhead due to copying data into a circular buffer, which I would have ...
4
votes
1answer
34 views

Why does my named pipe keep getting modified?

I have a named fifo created from a C program like this: res = mkfifo("/home/myfolder/myfifo", 0666); after that there are only reads and writes. Now, from this answer : Does a named pipe change ...
0
votes
0answers
11 views

Can rsyslogd write to more than one named pipe

If I have the following two lines in the rsyslogd.conf *.* |/var/run/rsyslog/pipe1 *.* |/var/run/rsyslog/pipe2 Will all messages be sent to both pipes? I have two programs that want to inspect ...
0
votes
0answers
37 views

Am I missing something for mkfifo to work?

I am trying to get frontend-term/omxplayer-console working on a raspberry pi. Specifically I am referring to the way I am supposed to be able to press keyboard characters and it translates those into ...
2
votes
2answers
104 views

How to read from a named pipe after the writer process exits?

I want to use named pipes as asynchrnonous task queues (JMS-like, perhaps). For example, suppose a client sends some data that I wish to insert into a database, but I want the client to disconnect ...
2
votes
1answer
27 views

create several /dev/xconsole files automatically upon boot

I understand from my previous question that the /dev/xconsole file can be created using mkfifo. On my system (Debian Wheezy), /dev/xconsole gets created automatically. I am wondering who creates it ...
2
votes
3answers
34 views

Buffering (named) pipe in GNU OS

In the GNU OS a process can only write data to a pipe if another process reads the same data (from the same pipe) at the same time. Is there something like a pipe which lets the 1st process write and ...
5
votes
1answer
273 views

Why does “cat /tmp/out1 > /tmp/in2 &” appear as “bash” with the “ps” command?

Consider: mkfifo /tmp/out1 mkfifo /tmp/in2 cat /tmp/out1 > /tmp/in2 & When I run ps it appears as bash in the CMD section. Why?
1
vote
1answer
29 views

Custom python REPL with fifos

Is it possible to make a custom REPL (for e.g. python) with two fifos? Explanation of the problem Suppose I have two fifos in and out. I have three terminals. In the first I want to run commands ...
0
votes
2answers
65 views

mkfifo - Does disk I/O actually occur?

I have 2 applications: Producer (N instances) Consumer (1 instance) I currently write out intermediate results from the producers, and then the consumer reads these files from disk and produces a ...
1
vote
1answer
82 views

Why doesn't this piped script work?

#!/bin/bash rm out mkfifo out nc -l 8080 < out | while read line do echo hello > out echo $line done If I browse to the IP of the machine this script is running on (using port ...
3
votes
1answer
38 views

Can close() block?

For example, if you close a pipe or socket that still has data in its write buffer that hasn't been read by the process on the other end, does close() block until the data is read or the other process ...
5
votes
1answer
281 views

How do I use inotify or named pipes over SSHFS?

Thanks sshfs magic, I can mount my home dir from a remote server with sshfs user@server:/home/user ~/remote Optimistically, I thought I'd set a local inotify-hook on ~/remote/logFile (in the sshfs ...
4
votes
1answer
323 views

Communicating from bash with grunt shell

I'm tired of the slow startup time of hadoop fs just to query HDFS. This isn't a problem with HDFS itself though, because using HDFS file system commands within the Pig "grunt shell" is pretty fast. ...
2
votes
2answers
1k views

continuous reading from named pipe (cat or tail -f)

I have configured rsyslog to log certain log events to /dev/xconsole: *.*;cron.!=info;mail.!=info |/dev/xconsole /dev/xconsole is a named pipe (fifo). If I want to see what is being logged, I ...
5
votes
1answer
117 views

What are the difference between those four commands (fifo, process substitution, redirection…)

My goal is to create a simple echo server using nc and a single fifo. I'm not looking for the best way to do it, I'm merely trying to understand the semantics of the following commands (when does fork ...
1
vote
1answer
79 views

How to redirect logs to a fifo device?

I have the following line in the rsyslog config file: *.*;auth,daemon,kern,user -/dev/logi and it does what it should, but I wanted to send some iptables logs to a different file, so I added the ...
1
vote
3answers
324 views

How to remove all FIFO files with a shell command

I can't find a shell command to remove all the FIFO files inside a directory. In fact, for the removal of directories, the rm command offers the options -d, --dir, but for FIFOs it offers no option. ...
2
votes
1answer
309 views

closing the unwanted file descriptors

I am trying to understand how pipes work . This code snippet is from some website . So my understanding of the program goes like this : When we do pipe(fd) then fd[0]=3 and fd[0]=4 ( assuming only ...
3
votes
1answer
373 views

Prevent hanging of “echo STRING > fifo” when nothing is reading that FIFO

When I echo something to a named pipe made with mkfifo, it hangs if no process is reading from that pipe. How can I prevent that, i.e., stop that from hanging? And by the way, why is that hanging ...
0
votes
1answer
341 views

Using Fifo hang script

out="$katalog/out" # wyjscie fifo="$katalog/fifo" # wejscie mkfifo $fifo touch $out [...] #k ./a.out <$fifo >$out & pid=$! [...] # get input line by line loop start echo "$liniain" >> ...
6
votes
1answer
553 views

bash scripting - read tarball from stdin

I have a task I need to script that I feel should be stupidly simple, but I'm actually having a rather tough time. I have a short bash script that takes a specific type of application in tarball form ...
4
votes
5answers
499 views

Semi-asynchronous pipe

Assume I have the following pipe: a | b | c | d How to wait for completion of c (or b) in sh or bash? This means that script d can start any time (and does not need to be waited for) but requires ...
2
votes
1answer
827 views

How can I pipe commands to any terminal?

I often use more than one terminal (or terminal emulator) at a time; and while in X I can copy-paste commands, besides not being very practical, it obviously does not work on the real TTY. The first ...
0
votes
0answers
169 views

Reading from named pipe freezes when piping tshark output

I'm trying to implement a web prefetching system. The purpose of a system like this is to “predict” future requests and prefetch them. The system builds a predictive model from web navigation logs ...
5
votes
2answers
437 views

A virtual file containing the concatenation of other files

Is there a way of creating a filesystem object akin to this: mknod files p cat file1 file2 ... fileN > files but such that it can be seeked in, as if it were a regular file?
0
votes
1answer
363 views

Cat into fifo not running through bash

I want to script these few lines mkfifo my.fifo cat >my.fifo & cat my.fifo | nc remotehost.tld 10000 But the line cat >my.fifo & When i run it manually it works, but not through ...
3
votes
2answers
1k views

Why does a named pipe not get deleted after system restart?

As far as I understand, named pipes are not written to disk but are stored in memory. Here's how I created a named pipe - $ mkfifo pipe21 $ grep "simple" SimpleDoc.txt > pipe21 & [1] 2775 $ ...
1
vote
2answers
2k views

Cheapest way to find the oldest file (recursively) from a directory under heavy load

What is the least expensive way to find the oldest file in a directory, including all directories underneath. Assume directory is backed by SAN and under heavy load. There is concern that "ls" could ...
4
votes
2answers
935 views

Problem with pipes. Pipe terminates when reader done

I am on OSX, using bash, trying to make sense of pipes. I wish to let a program communicate in two directions with a bash shell. I want to set this up in such a way that this is always the same shell, ...
2
votes
2answers
681 views

Does named pipe modify the filesystem?

As title. If I create a named pipe and then read/write on it, is the filesystem where the named pipe resides affected? I.e. is the data buffered on the filesystem until read, or does it reside in ...
9
votes
4answers
5k views

Are FIFO, pipe & Unix domain socket the same thing in Linux kernel?

I heard that FIFOs are named pipes. And they have exactly the same semantics. On the other hand, I think Unix domain socket is quite similar to pipe (although I've never made use of it). So I wonder ...
1
vote
2answers
243 views

where are the “files” of ipcs and why are named pipes (mkfifo) not listed in ipcs

I was researching about linux shared memory and stumbled upon this ipcs command. From the man page: ipcs - provide information on ipc facilities ipc is not explained in the man page but it most ...
3
votes
3answers
687 views

Can't process stdout with pipe as it comes

I'm running tshark on a fifo, and the following is a bare example of a loop that prints the output of tshark as it comes: tshark -i $fifo | while read line; do echo $line done The problem ...