Sujet : Re: The joy of pipes
De : 186283 (at) *nospam* ud0s4.net (186282@ud0s4.net)
Groupes : comp.os.linux.miscDate : 17. Nov 2024, 07:05:20
Autres entêtes
Organisation : wokiesux
Message-ID : <LhadnVAfppIrGqT6nZ2dnZfqnPidnZ2d@earthlink.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
On 11/17/24 12:30 AM, Lawrence D'Oliveiro wrote:
On Sat, 16 Nov 2024 23:59:41 -0500, 186282@ud0s4.net wrote:
On 11/16/24 5:31 AM, Richard Kettlewell wrote:
>
“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.
>
Didn't say temp disk files were necessarily SUPERIOR, just that they
CAN do most of the stuff pipes are used for and in an easier
user/code-friendly fashion.
Not really, no.
SIZE is almost unlimited too.
That is another reason they don’t work.
It's a block of info, just by one means over another.
any sub-process/thread can write to a file as easily
as a pipe. Just need a good naming scheme.
But, as said, better to stick to pipes for most needs.
If you're passing multi-megabyte pages of text/images
or whatever back to the parent then you're doing
something wrong. Don't hassle yer parents ! :-)