Sujet : Re: The joy of pipes
De : spamtrap42 (at) *nospam* jacob21819.net (Robert Riches)
Groupes : comp.os.linux.miscDate : 16. Nov 2024, 05:33:07
Autres entêtes
Organisation : none-at-all
Message-ID : <slrnvjg843.1g8.spamtrap42@one.localnet>
References : 1 2 3 4 5 6 7 8 9
User-Agent : slrn/1.0.3 (Linux)
On 2024-11-15, Louis Krupp <
lkrupp@invalid.pssw.com.invalid> wrote:
This is a multi-part message in MIME format.
--------------cDOk308Xy6TMkzB8MsXpyDQY
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
>
On 11/15/2024 12:49 AM, 186282@ud0s4.net wrote:
On 11/14/24 9:05 PM, Lawrence D'Oliveiro wrote:
On Thu, 14 Nov 2024 16:09:07 -0800, John Ames wrote:
>
(I think it was a topic shift to applications of *nix pipes...?)
>
Oh shelly boy, the pipes, the pipes are calling ...
>
Pipes are good.
>
But, really, they're just temp files the parent
process can access.
>
Pipes *could* be implemented with temporary disk files, at least to an
extent, but as far as I can tell, they're not.
>
Quoting from this page:
>
https://www.geeksforgeeks.org/piping-in-unix-or-linux/#
>
In Linux, a pipe is not a regular file but a type of inter-process
communication (IPC) mechanism that acts as a buffer, which can be
used to connect the output of one process to the input of another.
Although pipes are not files, they are implemented using file
descriptors and share many behaviors with files. They exist only in
memory and do not have a presence in the file system, unlike regular
files.
>
Louis
There are also "named pipes" aka FIFOs. On Devuan Daedalus (and
probably most other distributions) this command will show
information about them:
man 7 pipe
I have used a named pipe aka FIFO on a Raspberry PI. An mplayer
process reads from a PVR-USB2 TV receiver and writes to the named
pipe or FIFO. A netcat process reads from the named pipe or FIFO
to send the bits to a larger computer with substantial disk
storage. A 105 minute recording session is several GB in size.
A cron job, ssh, and some shell scripting launch the stuff.
(Unfortunately, either the amplified TV antenna in the attic has
lost its gain, or the PVR-USB2 unit has lost front-end gain, so
it has not captured a viewable program in a few years.)
HTH
-- Robert Richesspamtrap42@jacob21819.net(Yes, that is one of my email addresses.)