Re: The joy of pipes

Liste des GroupesRevenir à col misc 
Sujet : Re: The joy of pipes
De : 186283 (at) *nospam* ud0s4.net (186282@ud0s4.net)
Groupes : comp.os.linux.misc
Date : 18. Nov 2024, 04:50:41
Autres entêtes
Organisation : wokiesux
Message-ID : <Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@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 3:42 AM, Richard Kettlewell wrote:
"186282@ud0s4.net" <186283@ud0s4.net> writes:
On 11/16/24 5:31 AM, Richard Kettlewell wrote:
Louis Krupp <lkrupp@invalid.pssw.com.invalid> writes:
 
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.
>
   Didn't say temp disk files were necessarily SUPERIOR,
 Indeed. You said they’re really the same, which they’re not.
   Umm ... they're all "blocks of information", however
   stored/accessed. The little details are, well, the
   little details.

   just that they CAN do most of the stuff pipes are used for and in an
   easier user/code-friendly fashion.
 There’s certainly an overlap in the end goals you can meet with them,
but even within that overlap they’re used in slightly different ways.
 
   SIZE is almost unlimited too.
 Capacity is one of the ways in which they are very different, already
alluded to above.
   As I said somewhere, if your child processes are sending
   megabytes back to the parent you're DOING SOMETHING WRONG.
   Using files -vs- pipes you CAN xmit mass quantities of
   data between parent/child and or child/child but that's
   probably not the best way to write your app. Leave the
   parent to do 'parent stuff' mostly.
   But somebody, somewhere, for some reason, MIGHT wanna
   do it differently ... and maybe, in context, it's for
   a good reason. I'm not gonna piss all over them.

   Anyway, I'd made some TCP/UDP servers but the parent needed
   to know the status of the children in a little more detail
   than just a tiny return code - might want to terminate the
   child if it'd been idle for awhile, might want to know how
   much bandwidth was being used, might want to pick a good
   time to do some maint routines, might want to know WHO the
   connections were from. Pipes were the (relatively) easy
   'C'-approved method and did the job very well.
 I’ve no idea what you think “’C’-approved” means. C is a programming
language, not a set of guidelines. Pipes are an OS concept, not
appearing in the C language standard.
   The 'C' Way IS a sort of 'philosophy' I think ... an
   approach to programming and data-use. Most every lang
   is that way. The Algol/Pascal/Modula approach is a bit
   different, another 'look and feel' to all the issues.
   Everybody has what they think is "The Best Way" - of
   thinking/doing. Otherwise we shoulda all stuck with ASM.
   No FORTRAN, no COBOL, no LISP, no Algol, no 'C' ....
   The way 'C' does interprocess comms was writ in, by and
   for 'C'. As such if you're doing 'C' you will have the
   best luck and least angst going with the flow.
   You can also send/receive between parent/child and
   such by passing socket info. See :
https://stackoverflow.com/questions/14427898/how-can-i-pass-a-socket-from-parent-to-child-processes

Date Sujet#  Auteur
9 Nov 24 * The joy of octal66Chris Ahlstrom
11 Nov 24 `* Re: The joy of octal65John Ames
11 Nov 24  +* Re: The joy of octal49Chris Ahlstrom
12 Nov 24  i+* Re: The joy of octal47Chris Ahlstrom
12 Nov 24  ii`* Re: The joy of EBCDIC46John Ames
12 Nov 24  ii +* Re: The joy of EBCDIC3Chris Ahlstrom
12 Nov 24  ii i`* Re: The joy of EBCDIC2candycanearter07
13 Nov 24  ii i `- Re: The joy of EBCDIC1Chris Ahlstrom
14 Nov 24  ii `* Re: The joy of EBCDIC42Fritz Wuehler
14 Nov 24  ii  `* Re: The joy of EBCDIC41Clemens Schüller
15 Nov 24  ii   `* Re: The joy of EBCDIC40Eli the Bearded
15 Nov 24  ii    `* Re: The joy of pipes39John Ames
15 Nov 24  ii     +* Re: The joy of pipes37Lawrence D'Oliveiro
15 Nov 24  ii     i`* Re: The joy of pipes36186282@ud0s4.net
15 Nov 24  ii     i +- Re: The joy of pipes1John Ames
16 Nov 24  ii     i +- Re: The joy of pipes1Lawrence D'Oliveiro
16 Nov 24  ii     i +* Re: The joy of pipes2Robert Riches
16 Nov 24  ii     i i`- Re: The joy of pipes1Lawrence D'Oliveiro
16 Nov 24  ii     i +* Re: The joy of pipes4186282@ud0s4.net
16 Nov 24  ii     i i`* Re: The joy of pipes3rbowman
16 Nov 24  ii     i i `* Re: The joy of pipes2186282@ud0s4.net
17 Nov 24  ii     i i  `- Re: The joy of pipes1186282@ud0s4.net
16 Nov 24  ii     i `* Re: The joy of pipes27Richard Kettlewell
17 Nov 24  ii     i  `* Re: The joy of pipes26186282@ud0s4.net
17 Nov 24  ii     i   +* Re: The joy of pipes4Lawrence D'Oliveiro
17 Nov 24  ii     i   i`* Re: The joy of pipes3186282@ud0s4.net
17 Nov 24  ii     i   i `* Re: The joy of pipes2Lawrence D'Oliveiro
17 Nov 24  ii     i   i  `- Re: The joy of pipes1186282@ud0s4.net
17 Nov 24  ii     i   `* Re: The joy of pipes21Richard Kettlewell
18 Nov 24  ii     i    `* Re: The joy of pipes20186282@ud0s4.net
18 Nov 24  ii     i     +* Re: The joy of pipes17Lawrence D'Oliveiro
18 Nov 24  ii     i     i`* Re: The joy of pipes16186282@ud0s4.net
18 Nov 24  ii     i     i `* Re: The joy of pipes15Pancho
18 Nov 24  ii     i     i  +* Re: The joy of pipes13Lawrence D'Oliveiro
18 Nov 24  ii     i     i  i`* Re: The joy of pipes12Pancho
18 Nov 24  ii     i     i  i +* Re: The joy of pipes8The Natural Philosopher
18 Nov 24  ii     i     i  i i+* Re: The joy of pipes3Pancho
18 Nov 24  ii     i     i  i ii+- Re: The joy of pipes1The Natural Philosopher
18 Nov 24  ii     i     i  i ii`- Re: The joy of pipes1rbowman
19 Nov 24  ii     i     i  i i`* Re: The joy of pipes4186282@ud0s4.net
19 Nov 24  ii     i     i  i i +- Re: The joy of pipes1Lawrence D'Oliveiro
19 Nov 24  ii     i     i  i i +- Re: The joy of pipes1The Natural Philosopher
19 Nov 24  ii     i     i  i i `- Re: The joy of pipes1Richard Kettlewell
18 Nov 24  ii     i     i  i `* Re: The joy of pipes3rbowman
19 Nov 24  ii     i     i  i  `* Re: The joy of pipes2Pancho
19 Nov 24  ii     i     i  i   `- Re: The joy of pipes1Lawrence D'Oliveiro
19 Nov 24  ii     i     i  `- Re: The joy of pipes1186282@ud0s4.net
19 Nov 24  ii     i     `* Re: The joy of pipes2Robert Riches
19 Nov 24  ii     i      `- Re: The joy of pipes1Lawrence D'Oliveiro
15 Nov 24  ii     `- Re: The joy of pipes1Eli the Bearded
12 Nov 24  i`- Re: The joy of octal1Eli the Bearded
12 Nov 24  `* Re: The joy of octal15Fritz Wuehler
15 Nov 24   `* Re: The joy of octal14186282@ud0s4.net
15 Nov 24    `* Re: The joy of octal13rbowman
16 Nov 24     +* Re: The joy of octal7186282@ud0s4.net
16 Nov 24     i`* Re: The joy of octal6rbowman
16 Nov 24     i `* Re: The joy of octal5186282@ud0s4.net
16 Nov 24     i  +* Re: The joy of octal2Don_from_AZ
17 Nov 24     i  i`- Re: The joy of octal1186282@ud0s4.net
16 Nov 24     i  `* Re: The joy of octal2rbowman
17 Nov 24     i   `- Re: The joy of octal1186282@ud0s4.net
16 Nov 24     `* Re: The joy of octal5186282@ud0s4.net
16 Nov 24      +- Re: The joy of octal1rbowman
16 Nov 24      `* Re: The joy of octal3Andreas Eder
16 Nov 24       `* Re: The joy of octal2The Natural Philosopher
17 Nov 24        `- Re: The joy of octal1186282@ud0s4.net

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal