From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80b3e504140e89fd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-24 06:33:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Config_Files proposal Date: 24 Jun 2002 09:20:08 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3D0FAC67.A4861809@san.rr.com> <3D10B6B1.AFE9D4E8@san.rr.com> <3D10E046.E604231D@san.rr.com> <3D1204B5.4620F160@san.rr.com> <3D1215A8.719D39C5@nbi.dk> <3D123852.1040508@san.rr.com> <3D1289D2.9090107@telepath.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1024925247 604 128.183.220.71 (24 Jun 2002 13:27:27 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 24 Jun 2002 13:27:27 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:26646 Date: 2002-06-24T13:27:27+00:00 List-Id: "Marin David Condic" writes: > I'd like to understand how to do some form of file lock-out for simultaneous > access by different processes without immediately getting into some kind of > OS dependant code. You can't; file locking is OS dependant. However, that in itself is ok for Config_Files. There is no _requirement_ that it be possible to implement Config_Files in an OS independent way. It would be nice, of course. > I can imagine a variety of semaphore schemes that will depend on the > OS or at least semi-portable facilities, but if the objective is to > to it strictly within the bounds of Ada, I can't think of a way to > do that. That is _not_ one of the objectives. The main objective is to produce something useful; sometimes that requires OS dependence. > If the goal is pure, portable, run-anywhere Ada code, I'm betting > that it will come down to "Don't do simultaneous access - it would > be Bad..." Not the goal. My objection to getting into file locking is twofold: 1) It's complex, and hard to get right. 2) The registry already does it, so use that if you need it. I believe there are many applications for config files that don't need file locking. But I'm willing to be convinced otherwise. -- -- Stephe