Path: utzoo!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!pdn!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.perl Subject: Re: Why... Message-ID: <27D7FB2E.472@tct.uucp> Date: 8 Mar 91 20:59:26 GMT References: <124891@uunet.UU.NET> Organization: Teltronics/TCT, Sarasota, FL Lines: 24 According to rbj@uunet.UU.NET (Root Boy Jim): >...do shmread & shmwrite exist? Was it too much trouble to > create a variable whose size and location were fixed? > >...given that we really do want shmread & shmwrite, why is the > shared memory region repeatedly attached to & from? > Does perl open & close files between I/O :-) I did the System V IPC support, so let me answer. The reason was... laziness and impatience! (How appropriate for hacking Perl features...) I needed support for System V IPC, but I didn't need speed. I didn't (and still don't) understand Perl's internals well enough to hack in fixed-location and fixed-size variables. Ergo, shmread/shmwrite. As for the attach/detach, that's necessary to allow removed shared memory segments to disappear -- if you keep a segment attached, it will never disappear. -- Chip Salzenberg at Teltronics/TCT , "Most of my code is written by myself. That is why so little gets done." -- Herman "HLLs will never fly" Rubin