Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #61044

Re: The joy of pipes

Subject Re: The joy of pipes
Newsgroups comp.os.linux.misc
References (7 earlier) <hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> <A7GZO.66$hgYd.23@fx41.iad> <wwvr07bpizm.fsf@LkoBDZeT.terraraq.uk> <JJOdnfSeXoej5aT6nZ2dnZfqnPSdnZ2d@earthlink.com> <wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk>
From "186282@ud0s4.net" <186283@ud0s4.net>
Organization wokiesux
Date 2024-11-17 22:50 -0500
Message-ID <Uv-dnfY4yvgPJKf6nZ2dnZfqnPSdnZ2d@earthlink.com> (permalink)

Show all headers | View raw


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

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

The joy of octal Chris Ahlstrom <OFeem1987@teleworm.us> - 2024-11-09 09:36 -0500
  Re: The joy of octal John Ames <commodorejohn@gmail.com> - 2024-11-11 09:03 -0800
    Re: The joy of octal Chris Ahlstrom <OFeem1987@teleworm.us> - 2024-11-11 15:58 -0500
      Re: The joy of octal Louis Krupp <lkrupp@invalid.pssw.com.invalid> - 2024-11-12 02:30 -0700
        Re: The joy of octal Chris Ahlstrom <OFeem1987@teleworm.us> - 2024-11-12 07:29 -0500
          Re: The joy of EBCDIC John Ames <commodorejohn@gmail.com> - 2024-11-12 11:14 -0800
            Re: The joy of EBCDIC Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2024-11-12 19:51 +0000
              Re: The joy of EBCDIC Chris Ahlstrom <OFeem1987@teleworm.us> - 2024-11-12 16:12 -0500
                Re: The joy of EBCDIC candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-11-12 22:20 +0000
                Re: The joy of EBCDIC Chris Ahlstrom <OFeem1987@teleworm.us> - 2024-11-13 06:59 -0500
            Re: The joy of EBCDIC Fritz Wuehler <fritz@spamexpire-202411.rodent.frell.theremailer.net> - 2024-11-14 21:13 +0100
              Re: The joy of EBCDIC Clemens Schüller <cs.usenet@mailbox.org> - 2024-11-14 21:20 +0100
                Re: The joy of EBCDIC Eli the Bearded <*@eli.users.panix.com> - 2024-11-14 23:55 +0000
                Re: The joy of pipes John Ames <commodorejohn@gmail.com> - 2024-11-14 16:09 -0800
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-15 02:05 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-15 02:49 -0500
                Re: The joy of pipes John Ames <commodorejohn@gmail.com> - 2024-11-15 07:55 -0800
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-16 00:16 +0000
                Re: The joy of pipes Robert Riches <spamtrap42@jacob21819.net> - 2024-11-16 04:33 +0000
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-16 06:46 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-16 00:37 -0500
                Re: The joy of pipes rbowman <bowman@montana.com> - 2024-11-16 06:16 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-16 03:03 -0500
                Re: The joy of pipes Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2024-11-16 18:14 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-16 23:38 -0500
                Re: The joy of pipes Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2024-11-16 18:14 +0000
                Re: The joy of pipes Richard Kettlewell <invalid@invalid.invalid> - 2024-11-16 10:31 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-16 23:59 -0500
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-17 05:30 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-17 01:05 -0500
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-17 07:59 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-17 03:27 -0500
                Re: The joy of pipes Richard Kettlewell <invalid@invalid.invalid> - 2024-11-17 08:42 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-17 22:50 -0500
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-18 06:06 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-18 01:51 -0500
                Re: The joy of pipes Pancho <Pancho.Jones@proton.me> - 2024-11-18 09:20 +0000
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-18 09:36 +0000
                Re: The joy of pipes Pancho <Pancho.Jones@proton.me> - 2024-11-18 11:05 +0000
                Re: The joy of pipes The Natural Philosopher <tnp@invalid.invalid> - 2024-11-18 13:45 +0000
                Re: The joy of pipes Pancho <Pancho.Jones@proton.me> - 2024-11-18 17:04 +0000
                Re: The joy of pipes The Natural Philosopher <tnp@invalid.invalid> - 2024-11-18 17:47 +0000
                Re: The joy of pipes rbowman <bowman@montana.com> - 2024-11-18 17:59 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-18 22:50 -0500
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-19 04:53 +0000
                Re: The joy of pipes The Natural Philosopher <tnp@invalid.invalid> - 2024-11-19 09:19 +0000
                Re: The joy of pipes Richard Kettlewell <invalid@invalid.invalid> - 2024-11-19 09:56 +0000
                Re: The joy of pipes rbowman <bowman@montana.com> - 2024-11-18 17:54 +0000
                Re: The joy of pipes Pancho <Pancho.Jones@proton.me> - 2024-11-19 09:57 +0000
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-19 21:55 +0000
                Re: The joy of pipes "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-18 22:32 -0500
                Re: The joy of pipes Robert Riches <spamtrap42@jacob21819.net> - 2024-11-19 04:50 +0000
                Re: The joy of pipes Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-19 04:58 +0000
                Re: The joy of pipes Eli the Bearded <*@eli.users.panix.com> - 2024-11-15 06:41 +0000
                Re: The joy of EBCDIC Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2024-11-15 20:23 +0000
        Re: The joy of octal Eli the Bearded <*@eli.users.panix.com> - 2024-11-12 20:09 +0000
    Re: The joy of octal Fritz Wuehler <fritz@spamexpire-202411.rodent.frell.theremailer.net> - 2024-11-12 23:45 +0100
      Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-15 02:58 -0500
        Re: The joy of octal rbowman <bowman@montana.com> - 2024-11-15 18:28 +0000
          Re: The joy of octal Harold Stevens <wookie@aspen.localdomain> - 2024-11-15 14:30 -0600
            Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-16 00:01 -0500
              Re: The joy of octal rbowman <bowman@montana.com> - 2024-11-16 05:50 +0000
              Re: The joy of octal Andreas Eder <a_eder_muc@web.de> - 2024-11-16 15:14 +0100
                Re: The joy of octal The Natural Philosopher <tnp@invalid.invalid> - 2024-11-16 14:38 +0000
                Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-17 00:57 -0500
          Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-15 23:31 -0500
            Re: The joy of octal rbowman <bowman@montana.com> - 2024-11-16 05:24 +0000
              Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-16 03:20 -0500
                Re: The joy of octal Don_from_AZ <djatechNOSPAM@comcast.net.invalid> - 2024-11-16 09:16 -0700
                Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-17 00:17 -0500
                Re: The joy of octal rbowman <bowman@montana.com> - 2024-11-16 18:14 +0000
                Re: The joy of octal "186282@ud0s4.net" <186283@ud0s4.net> - 2024-11-17 00:40 -0500

csiph-web