Deutsch English Français Italiano |
<wwvwmh2z1y3.fsf@LkoBDZeT.terraraq.uk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.roellig-ltd.de!news.mb-net.net!open-news-network.org!news.gegeweb.eu!gegeweb.org!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail From: Richard Kettlewell <invalid@invalid.invalid> Newsgroups: comp.os.linux.misc Subject: Re: The joy of pipes Date: Sun, 17 Nov 2024 08:42:12 +0000 Organization: terraraq NNTP server Message-ID: <wwvwmh2z1y3.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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6"; logging-data="145058"; mail-complaints-to="usenet@innmantic.terraraq.uk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:h6f1rOpROt9RwOPgRyPplu6LJp0= 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 Bytes: 3598 Lines: 49 "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. > 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. > 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. -- https://www.greenend.org.uk/rjk/