From: jduarte@liege.ICS.UCI.EDU (J o s e D u a r t e)
Subject: Re: special Ada functions
Date: 19 Jun 91 21:08:11 GMT [thread overview]
Message-ID: <9106191407.aa02750@PARIS.ICS.UCI.EDU> (raw)
In-Reply-To: <818@wrdis01.af.mil>
> I am looking for an Ada package that includes the following
> functions/procedures:
> 1. Record locking
> 2. A function that takes a signal (character) from the keyboard without
> the usage of the return key. For example: I use only the up arrow key
> to move up the screen.
>
> Also I would be interested if these functions could be written in Ada only
> (no assembly).
>
> I use an ATT 3B2 with the Verdix 5.7C Ada compiler under Unix.
For "1." above you can use the C library functions flock(),lockf(), or fcntl()
by making "pragma" interfaces to 'em...Locks set by lockf() aren't compatible
with locks set by flock(); however, they are compatible with locks set by
fcntl().
> Take a look at the man page for lockf(3c), that will tell you how to
> set and test the locks. The locks will go across NFS just fine.
>
> The biggest thing to remember is that these locks are advisory (lockf),
> meaning that only processes that test for the lock on the file will be aware
> of the lock (so multiple copies of programs you write that use the lock
> won't collide), but other programs can still write to the file without
> even looking at the lock.
> If you want to turn the locks into mandatory locks that will prevent
> other processes from writing to the file, you need to set the file's
> mode bits to a special value. This should be explained in the man
> page.
I'm pretty sure that "2." was previously discussed, but I didn't save the
solutions proposed by people.
Jose' D.
prev parent reply other threads:[~1991-06-19 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-06-19 16:57 special Ada functions Claus Franzkowiak
1991-06-19 21:08 ` J o s e D u a r t e [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