comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Files opened for exclusive read
Date: Mon, 15 Mar 2004 23:28:33 -0600
Date: 2004-03-15T23:28:33-06:00	[thread overview]
Message-ID: <105d44ndehghj94@corp.supernews.com> (raw)
In-Reply-To: UIednfmQiM5acdbd4p2dnA@adelphia.com

"Dan Allex" <dallex@erols.com> wrote in message
news:UIednfmQiM5acdbd4p2dnA@adelphia.com...
> Apparently, this is a short comming of Object Ada running on NT.
> Appreciate all the responses.  I'm trying to convince the powers that be
> to migrate to GNAT.
>
> Daniel Allex wrote:
> > When Ada opens a file, the only option is for exclusive use.  This
> > causes a problem when multiple executables may be reading at the same
> > time.  Any suggestions?

(I know this is late; I'm just back from a week off...)

When the file is opened in Windows, it is necessary to pass the appropriate
sharing bits. By default, files are opened for exclusive access in Windows.
I think most Ada run-time systems just do the default by default. But good
Windows compilers support some sort of Form parameter to set the sharing
mode. Certainly Janus/Ada does that, and I'm pretty sure we got the idea
from the Aonix Ada 83 compilers. So I'd be quite surprised if ObjectAda
doesn't have a way to do it.

Note that this has nothing to do with Ada, so the technique for doing it is
likely to be completely different on each compiler. I'd suggest contacting
Aonix's support people with your question (presuming you can't find any
discussion of it in their documentation). (I'm not convinced that the GNAT
support really will solve your problem, although there probably is some way
to get the handle opened directly by Windows and then used as an Ada file.)

                        Randy.






      reply	other threads:[~2004-03-16  5:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-05 13:13 Files opened for exclusive read Daniel Allex
2004-03-05 14:44 ` Preben Randhol
2004-03-05 16:54 ` Robert I. Eachus
2004-03-05 18:14   ` Preben Randhol
2004-03-05 19:04     ` Mark H Johnson
2004-03-05 19:32       ` Mark H Johnson
2004-03-05 19:52         ` Preben Randhol
2004-03-06  1:05   ` Jeffrey Carter
2004-03-08  3:47 ` Dan Allex
2004-03-16  5:28   ` Randy Brukardt [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox