All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
1answer
81 views

concurrent processing in bash using process expansion, and redirection

Apart from possible races that have to be controlled by using proper synchronisation, it's possible in bash to feed a data source concurrently into multiple pipelines and collect all their outputs ...
0
votes
1answer
98 views

Multiple fifos over SSH

Shell script allow multiple file descriptors (up to 9 for POSIX compliance, but even more for bash): $ install -m 755 /dev/stdin /tmp/test <<\EOF #!/bin/sh echo hi1 >&1 echo hi2 >&...
10
votes
3answers
2k views

Named pipes, file descriptors and EOF

Two windows, same user, with bash prompts. In window-1 type: $ mkfifo f; exec <f So bash is now attempting to read from file descriptor 0, which is mapped to named pipe f. In window-2 type: $ ...
0
votes
1answer
241 views

using fifo for daemons

While studying from Richard Stevens' book Unix network programming, I came across the following lines that speak about using FIFO between a client and a server. Client processes are started and ...
1
vote
1answer
197 views

Byte Offsets for pipe/FIFO

Why are byte offsets for a pipe/FIFO maintained in the inode rather than the file table, like for regular files? I read this line at page 113 of The Design of The Unix Operating System (1986) by ...
2
votes
1answer
1k views

How to read a webcam that is already used by a background capture?

A ffmpeg webcam capture is running in the background. ffmpeg -f video4linux2 -s vga -i /dev/video0 capture.mp4 (1) I am therefore unable to read it with ffplay since the device /dev/video0 is ...
5
votes
1answer
963 views

Opening named pipe blocks forever, if pipe is deleted without being connected

Try the following shell commands: mkfifo /tmp/test.pipe ls -1 /tmp > /tmp/test.pipe & rm /tmp/test.pipe mkfifo /tmp/test.pipe cat /tmp/test.pipe & jobs The ls command is just an ...
3
votes
1answer
1k views

mkfifo pipes, file descriptors and ImageMagick (convert)

I'm in trouble using named pipes (i.e. created with mkfifo) and file descriptors to redirect outputs and grab inputs to/from them within ImageMagick (convert). Basically, with the following bash code ...
11
votes
4answers
993 views

Program output redirection

When trying to redirect program output with the "some number greater than" syntax (eg foo 2> myfile), what are the possible numbers here and what do they represent? I believe 1 is /dev/stdout, 2 ...
3
votes
1answer
4k 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 ...