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,7624df5e57d09688 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-09 13:39:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!news.voicenet.com!nntp2.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin4.nnrp.aus1.giganews.com.POSTED!not-for-mail Sender: Stephe@TAKVER Newsgroups: comp.lang.ada Subject: Re: config files proposal References: <3CFA8E42.B7844253@san.rr.com> <4519e058.0206030656.34c424ff@posting.google.com> <3CFB94A7.A455B8DD@san.rr.com> From: Stephen Leake Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-GC-Trace: gv1-R232bokn333rpD5hNIZAwwrCTXYNys+CZ9N12E= NNTP-Posting-Date: Sun, 09 Jun 2002 15:39:06 CDT Organization: Giganews.Com - Premium News Outsourcing X-Trace: sv3-a07W/nz5rRAcEzkS9Nes+9R97I+MPT6QHJqSfAA1/SlX22Cly7vDhEHg2JlcVAfe/JAyxzh0jv0CPhb!CNajkCPfxe9XKXFTR/sF7qDu3fH4OlCVgUBMlwKO2poYAMgNHfHvEw== X-Complaints-To: abuse@comcast.com X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Date: Sun, 09 Jun 2002 20:39:07 GMT Xref: archiver1.google.com comp.lang.ada:25620 Date: 2002-06-09T20:39:07+00:00 List-Id: Darren New writes: > I think there should also be some sort of tag at the front of each file > saying it's an Ada config file, even if only > > -- Ada Grace.Config file V1.0 -- Do not hand-edit. Part of the point is to _allow_ hand editing :). > so one could check you've found a proper file and know what version > it is. Yes, I'm leaning towards a standard implemntation of config file versions. If only to hint to application builders that they should consider versioning issues! It's easy to do in the root tag of an XML document. > > > Yes. Actually, I think the file is OS closed at the end of Open, > > > after the data is read in. > > > > *That* sounds like an implementation detail to me. Its a good idea > > perhaps, but still an implementation detail. > > I think it's an important detail for systems where having a file open > changes the semantics for other users. Not for config files. These are _explicitly_ not accessible by parallel processes. Hmm. Guess I have to allow read-only parallel access if I'm allowing system-wide config files. Sigh. Why do things have to be so complicated? So yes, the file is closed at the end of an open operation. > If, for example, you leave it open after you write it, it's possible > I won't be able to read it. Arg. Who gets to write a system config file? This is why I wanted to exclude parallel access. > If you leave it open after reading it, I may be dedicating resources > on the file server to keeping track of it (assuming it's centrally > served, for example). Closing it each time would make it easier to > reason about multiple users using the same config file, and the > overhead of reopening it should be minimal, given it's a config > file. Yeah, I think closing it after each open and flush should be required. This will still depend on OS file system locking for preventing read while someone has a file open for write. That is _not_ required by the config file API, so we can use it on a primitive OS like VxWorks (hmm, maybe VxWorks has file locking?) or DOS. But it is an added feature of using a real OS. -- -- Stephe