Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #410: Electrical conduits in machine room are melting.


comp / comp.os.linux.misc / Re: The joy of pipes

SubjectAuthor
* The joy of octalChris Ahlstrom
`* Re: The joy of octalJohn Ames
 `* Re: The joy of octalChris Ahlstrom
  `* Re: The joy of octalLouis Krupp
   +* Re: The joy of octalChris Ahlstrom
   |`* Re: The joy of EBCDICJohn Ames
   | +* Re: The joy of EBCDICCharlie Gibbs
   | |`* Re: The joy of EBCDICChris Ahlstrom
   | | `* Re: The joy of EBCDICcandycanearter07
   | |  `- Re: The joy of EBCDICChris Ahlstrom
   | `* Re: The joy of EBCDICFritz Wuehler
   |  `* Re: The joy of EBCDICClemens Schüller
   |   `* Re: The joy of EBCDICEli the Bearded
   |    +* Re: The joy of pipesJohn Ames
   |    |+* Re: The joy of pipesLawrence D'Oliveiro
   |    ||`* Re: The joy of pipes186282@ud0s4.net
   |    || +- Re: The joy of pipesJohn Ames
   |    || +- Re: The joy of pipesLawrence D'Oliveiro
   |    || +* Re: The joy of pipesRobert Riches
   |    || |`- Re: The joy of pipesLawrence D'Oliveiro
   |    || +* Re: The joy of pipes186282@ud0s4.net
   |    || |`* Re: The joy of pipesrbowman
   |    || | +* Re: The joy of pipes186282@ud0s4.net
   |    || | |`* Re: The joy of pipesCharlie Gibbs
   |    || | | `- Re: The joy of pipes186282@ud0s4.net
   |    || | `- Re: The joy of pipesCharlie Gibbs
   |    || `* Re: The joy of pipesRichard Kettlewell
   |    ||  `* Re: The joy of pipes186282@ud0s4.net
   |    ||   +* Re: The joy of pipesLawrence D'Oliveiro
   |    ||   |`* Re: The joy of pipes186282@ud0s4.net
   |    ||   | `* Re: The joy of pipesLawrence D'Oliveiro
   |    ||   |  `- Re: The joy of pipes186282@ud0s4.net
   |    ||   `* Re: The joy of pipesRichard Kettlewell
   |    ||    `* Re: The joy of pipes186282@ud0s4.net
   |    ||     +* Re: The joy of pipesLawrence D'Oliveiro
   |    ||     |`* Re: The joy of pipes186282@ud0s4.net
   |    ||     | `* Re: The joy of pipesPancho
   |    ||     |  +* Re: The joy of pipesLawrence D'Oliveiro
   |    ||     |  |`* Re: The joy of pipesPancho
   |    ||     |  | +* Re: The joy of pipesThe Natural Philosopher
   |    ||     |  | |+* Re: The joy of pipesPancho
   |    ||     |  | ||+- Re: The joy of pipesThe Natural Philosopher
   |    ||     |  | ||`- Re: The joy of pipesrbowman
   |    ||     |  | |`* Re: The joy of pipes186282@ud0s4.net
   |    ||     |  | | +- Re: The joy of pipesLawrence D'Oliveiro
   |    ||     |  | | +- Re: The joy of pipesThe Natural Philosopher
   |    ||     |  | | `- Re: The joy of pipesRichard Kettlewell
   |    ||     |  | `* Re: The joy of pipesrbowman
   |    ||     |  |  `* Re: The joy of pipesPancho
   |    ||     |  |   `- Re: The joy of pipesLawrence D'Oliveiro
   |    ||     |  `- Re: The joy of pipes186282@ud0s4.net
   |    ||     `* Re: The joy of pipesRobert Riches
   |    ||      `- Re: The joy of pipesLawrence D'Oliveiro
   |    |`- Re: The joy of pipesEli the Bearded
   |    `- Re: The joy of EBCDICCharlie Gibbs
   `- Re: The joy of octalEli the Bearded

Pages:123
Subject: Re: The joy of pipes
From: Lawrence D'Oliv
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Tue, 19 Nov 2024 04:53 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.misc
Subject: Re: The joy of pipes
Date: Tue, 19 Nov 2024 04:53:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <vhh5kq$1mh1k$1@dont-email.me>
References: <vgns2aqlhq@dont-email.me> <20241112111426.00007245@gmail.com>
<e44df1bda1f1622a8d725c69860d3225@msgid.frell.theremailer.net>
<m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf>
<20241114160907.0000252b@gmail.com> <vh6a9k$33c17$5@dont-email.me>
<hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> <A7GZO.66$hgYd.23@fx41.iad>
<wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
<JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com>
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
<Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com>
<vhelgl$142m9$2@dont-email.me>
<UricnZ0glICSeaf6nZ2dnZfqn_adnZ2d@earthlink.com>
<vhf0sn$15fdk$1@dont-email.me> <vhf1qg$165g7$1@dont-email.me>
<vhf70v$16jpu$1@dont-email.me> <vhfgem$191cl$1@dont-email.me>
<z4Kdna93to-PlqH6nZ2dnZfqnPudnZ2d@earthlink.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Nov 2024 05:53:47 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c39ce09e5b4a7cfb75b87dd533b9fcc6";
logging-data="1786932"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19V2KVYE7Opy3VCh16C8Emk"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:4xNNlU87RTJ0XIJVOw8PVUci44Q=
View all headers

On Mon, 18 Nov 2024 22:50:41 -0500, 186282@ud0s4.net wrote:

> yer passing "blocks of information" between processes.

Pipes actually pass streams of information. And they won’t let you read
what hasn’t been written yet, or write too much beyond what hasn’t been
read yet.

In other words, they provide automatic synchronization between readers and
writers.

Subject: Re: The joy of pipes
From: Lawrence D'Oliv
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Tue, 19 Nov 2024 04:58 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.misc
Subject: Re: The joy of pipes
Date: Tue, 19 Nov 2024 04:58:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <vhh5t6$1mh1k$2@dont-email.me>
References: <vgns2aqlhq@dont-email.me> <20241112111426.00007245@gmail.com>
<e44df1bda1f1622a8d725c69860d3225@msgid.frell.theremailer.net>
<m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf>
<20241114160907.0000252b@gmail.com> <vh6a9k$33c17$5@dont-email.me>
<hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> <A7GZO.66$hgYd.23@fx41.iad>
<wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
<JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com>
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
<Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com>
<slrnvjo687.vg5.spamtrap42@one.localnet>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Nov 2024 05:58:15 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c39ce09e5b4a7cfb75b87dd533b9fcc6";
logging-data="1786932"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19d43PTw7OolawdaBwOBxib"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:af+PvbdCCzQxFgla2Z7+vKf97eQ=
View all headers

On 19 Nov 2024 04:50:15 GMT, Robert Riches wrote:

> A named pipe let mplayer write to a named file.

Another example is playing an audio file to a phone call made through the
Asterisk telephony engine. It wants the audio to be in a specific format
(e.g. GSM), while the original file might be in an entirely different
format. It’s easy enough to use FFmpeg to convert on the fly in real time.
The Asterisk playback command expects a file name, and I found that a
named pipe would work (bar a warning or two about it not being seekable).
Net result -- no need to pre-convert the audio or save temporary files
anywhere. And the pipe itself provides automatic synchronization between
the source (FFmpeg) and the sink (Asterisk).

Subject: Re: The joy of pipes
From: The Natural Philosop
Newsgroups: comp.os.linux.misc
Organization: A little, after lunch
Date: Tue, 19 Nov 2024 09:19 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc
Subject: Re: The joy of pipes
Date: Tue, 19 Nov 2024 09:19:35 +0000
Organization: A little, after lunch
Lines: 7
Message-ID: <vhhl77$1p0rr$1@dont-email.me>
References: <vgns2aqlhq@dont-email.me> <20241112111426.00007245@gmail.com>
<e44df1bda1f1622a8d725c69860d3225@msgid.frell.theremailer.net>
<m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf>
<20241114160907.0000252b@gmail.com> <vh6a9k$33c17$5@dont-email.me>
<hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> <A7GZO.66$hgYd.23@fx41.iad>
<wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
<JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com>
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
<Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com>
<vhelgl$142m9$2@dont-email.me>
<UricnZ0glICSeaf6nZ2dnZfqn_adnZ2d@earthlink.com>
<vhf0sn$15fdk$1@dont-email.me> <vhf1qg$165g7$1@dont-email.me>
<vhf70v$16jpu$1@dont-email.me> <vhfgem$191cl$1@dont-email.me>
<z4Kdna93to-PlqH6nZ2dnZfqnPudnZ2d@earthlink.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Nov 2024 10:19:37 +0100 (CET)
Injection-Info: dont-email.me; posting-host="e2d2b1df37bc0c4bf664d719eb467e94";
logging-data="1868667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/g5KRta8lABIDVJb6Mk0eN24PmqkFWE30="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:WDFaiT5L9KbToMsFwZFYsXEpCZE=
In-Reply-To: <z4Kdna93to-PlqH6nZ2dnZfqnPudnZ2d@earthlink.com>
Content-Language: en-GB
View all headers

On 19/11/2024 03:50, 186282@ud0s4.net wrote:
> Temporary files on a RAMdisk are fine (but slower).
not if it never gets to disk, but is all in cache

--
The New Left are the people they warned you about.

Subject: Re: The joy of pipes
From: Richard Kettlewell
Newsgroups: comp.os.linux.misc
Organization: terraraq NNTP server
Date: Tue, 19 Nov 2024 09:56 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.os.linux.misc
Subject: Re: The joy of pipes
Date: Tue, 19 Nov 2024 09:56:39 +0000
Organization: terraraq NNTP server
Message-ID: <wwvzflvfsx4.fsf@LkoBDZeT.terraraq.uk>
References: <vgns2aqlhq@dont-email.me> <20241112111426.00007245@gmail.com>
<e44df1bda1f1622a8d725c69860d3225@msgid.frell.theremailer.net>
<m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf>
<20241114160907.0000252b@gmail.com> <vh6a9k$33c17$5@dont-email.me>
<hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com>
<A7GZO.66$hgYd.23@fx41.iad> <wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
<JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com>
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
<Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com>
<vhelgl$142m9$2@dont-email.me>
<UricnZ0glICSeaf6nZ2dnZfqn_adnZ2d@earthlink.com>
<vhf0sn$15fdk$1@dont-email.me> <vhf1qg$165g7$1@dont-email.me>
<vhf70v$16jpu$1@dont-email.me> <vhfgem$191cl$1@dont-email.me>
<z4Kdna93to-PlqH6nZ2dnZfqnPudnZ2d@earthlink.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="33833"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:RMfNSSC1W9/7FZB9kcqRrfamefI=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
View all headers

"186282@ud0s4.net" <186283@ud0s4.net> writes:
> Dunno why everybody seems so keen to slag anybody
> who doesn't do it/see it exactly like some high-holy
> manual from 1982 says you're supposed to. That's
> no fun !

Without comment:

| As I said somewhere, if your child processes are sending
| megabytes back to the parent you're DOING SOMETHING WRONG.

--
https://www.greenend.org.uk/rjk/

Subject: Re: The joy of pipes
From: Pancho
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Tue, 19 Nov 2024 09:57 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Pancho.Jones@proton.me (Pancho)
Newsgroups: comp.os.linux.misc
Subject: Re: The joy of pipes
Date: Tue, 19 Nov 2024 09:57:47 +0000
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <vhhnet$1peus$1@dont-email.me>
References: <vgns2aqlhq@dont-email.me> <20241112111426.00007245@gmail.com>
<e44df1bda1f1622a8d725c69860d3225@msgid.frell.theremailer.net>
<m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf>
<20241114160907.0000252b@gmail.com> <vh6a9k$33c17$5@dont-email.me>
<hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> <A7GZO.66$hgYd.23@fx41.iad>
<wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
<JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com>
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
<Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com>
<vhelgl$142m9$2@dont-email.me>
<UricnZ0glICSeaf6nZ2dnZfqn_adnZ2d@earthlink.com>
<vhf0sn$15fdk$1@dont-email.me> <vhf1qg$165g7$1@dont-email.me>
<vhf70v$16jpu$1@dont-email.me> <lq1dalFqbacU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Nov 2024 10:57:49 +0100 (CET)
Injection-Info: dont-email.me; posting-host="7943ee8f2fae7c1bf486c429313a55b2";
logging-data="1883100"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MLk5jD9/KArIhXPSsjQaoiGu3gJ2d36A="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tS04R16IRT4oQzZH2Q218chZjZY=
Content-Language: en-GB
In-Reply-To: <lq1dalFqbacU1@mid.individual.net>
View all headers

On 11/18/24 17:54, rbowman wrote:
> On Mon, 18 Nov 2024 11:05:03 +0000, Pancho wrote:
>
>> I don't know if Linux provides message queues as a primitive, or not. I
>> meant I used message queue protocols (MQTT,zeroMQ, ActiveMQ).
>
>
> https://www.softprayog.in/programming/interprocess-communication-using-
> system-v-message-queues-in-linux
>
> https://www.softprayog.in/programming/interprocess-communication-using-
> posix-message-queues-in-linux
>
> I've only used System V queues. Neither work like ActiveMQ.

I was never particularly interested in the nitty gritty, when I say I
used ActiveMQ, I meant I used a wrapper API that used ActiveMQ, I think
JMS. I generally liked to decouple my software development from specific
implementations. It made my skills more transferable, less dependent on
a specific development stack.

So, for me all queues tended to be just Enqueue/Dequeue, FIFO, data
structures. The queue provider was mainly to shield me from the
complexity of dealing with monitoring and reliability issues involved in
handling a remote service.

I was just curious when this thread started commenting on what pipes
were and I realised I had never programmed them, and hence gained a
proper understanding. That has a knock on effect that I don't really
understand the behaviour of programs which do use pipes. I'm presuming
bash commands uses pipes.

Subject: Re: The joy of pipes
From: Lawrence D'Oliv
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Tue, 19 Nov 2024 21:55 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.misc
Subject: Re: The joy of pipes
Date: Tue, 19 Nov 2024 21:55:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <vhj1g2$21ps0$1@dont-email.me>
References: <vgns2aqlhq@dont-email.me> <20241112111426.00007245@gmail.com>
<e44df1bda1f1622a8d725c69860d3225@msgid.frell.theremailer.net>
<m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf>
<20241114160907.0000252b@gmail.com> <vh6a9k$33c17$5@dont-email.me>
<hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> <A7GZO.66$hgYd.23@fx41.iad>
<wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
<JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com>
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
<Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com>
<vhelgl$142m9$2@dont-email.me>
<UricnZ0glICSeaf6nZ2dnZfqn_adnZ2d@earthlink.com>
<vhf0sn$15fdk$1@dont-email.me> <vhf1qg$165g7$1@dont-email.me>
<vhf70v$16jpu$1@dont-email.me> <lq1dalFqbacU1@mid.individual.net>
<vhhnet$1peus$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Nov 2024 22:55:14 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c39ce09e5b4a7cfb75b87dd533b9fcc6";
logging-data="2156416"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PrCMCejr8DiOi09AyEBMy"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:laGe2KCGStC8y4/J7nkhIKA7hwA=
View all headers

On Tue, 19 Nov 2024 09:57:47 +0000, Pancho wrote:

> That has a knock on effect that I don't really
> understand the behaviour of programs which do use pipes. I'm presuming
> bash commands uses pipes.

As should be apparent by now, pipes are more than a substitute for
temporary files, they are an IPC/synchronization mechanism.

Consider this C program <https://gitlab.com/ldo/slow_dbus_server>, and see
how a pipe is used to send a termination notification from a worker thread
back to the main thread.

Pages:123

rocksolid light 0.9.8
clearnet tor