Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* File locking in OSF/1
@ 1993-04-21 17:11 Mike Peterson
  1993-04-22 11:49 ` Burkhard Neidecker-Lutz
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Peterson @ 1993-04-21 17:11 UTC (permalink / raw)


Does OSF/1 currently support file locking (other than classical UNIX advisory
file locking)?  Are there plans to support real locking?  If not, are there any
mechanisms ala kernel callouts as supported by Convex's UNIX from which one
might implement better file locking?

Regards,

/mtp
mtp@mold.zso.dec.com
-- 
#
#      +--------------------------------------------------------------+
#      | Michael T. Peterson          | Bellevue, Washington          | 
#      |--------------------------------------------------------------|


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: File locking in OSF/1
  1993-04-21 17:11 File locking in OSF/1 Mike Peterson
@ 1993-04-22 11:49 ` Burkhard Neidecker-Lutz
  0 siblings, 0 replies; 2+ messages in thread
From: Burkhard Neidecker-Lutz @ 1993-04-22 11:49 UTC (permalink / raw)


In article <1993Apr21.171103.26700@ninja.zso.dec.com> mtp@mold.zso.dec.com (Mike Peterson) writes:
>Does OSF/1 currently support file locking (other than classical UNIX advisory
>file locking)?  Are there plans to support real locking?  

Yes (at least DEC OSF/1 V1.2 does). From the man page for lockf(2):

The lockf() function locks and unlocks sections of an open file.  Unlike
  the fcntl() function, however, its interface is limited to setting only
  write (exclusive) locks.

  Although the lockf() and fcntl() functions are different, the implementa-
  tions are fully integrated.  Therefore, locks obtained from one function
  are honored and enforced by the other lock function.

  Each lock is either an enforced lock or an advisory lock, and must also be
  either a read lock or a write lock.

  Locks on a file are advisory or enforced depending on the mode of the file
  (see the chmod() function.) A given file can have advisory or enforced
  locks, but not both.  See the sys/mode.h header file for a description of
  file attributes.

  When a process holds an enforced exclusive lock on a section of a file, no
  other process can access that section of the file with the read() or
  write() functions. In addition, the open(), truncate(), and ftruncate()
  functions cannot truncate the locked section of the file.  If another pro-
  cess attempts to read or modify the locked section of the file, it sleeps
  until the section is unlocked or returns with an error indication.


		Burkhard Neidecker-Lutz

Distributed Multimedia Group, CEC Karlsruhe          EERP Portfolio Manager
Software Motion Pictures & BERKOM II Project         Multimedia Base Technology
Digital Equipment Corporation
neidecker@nestvx.enet.dec.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-04-22 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-04-21 17:11 File locking in OSF/1 Mike Peterson
1993-04-22 11:49 ` Burkhard Neidecker-Lutz

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