Sujet : Re: The joy of pipes
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.os.linux.miscDate : 16. Nov 2024, 11:31:57
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Louis Krupp <
lkrupp@invalid.pssw.com.invalid> writes:
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.
“Temporary files the parent can access” is not a good model for a couple
of reasons:
* The semantics are different. Bytes read from a regular file are still
there to be read again if you rewind the file; bytes read from a pipe
are gone. Empty/full files behave differently to empty/full pipes.
* Temporary regular files can already be accessed by other processes by
name, by file descriptor inheritance, or file descriptor passing.
-- https://www.greenend.org.uk/rjk/