File:  [CSRG BSD Unix] / 43BSDReno / usr.bin / ex / OTHER / FLOCK_README
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

Also added to vi is support for advisory file locking. Vi now assigns
a sharable lock when reading files, and an exclusive lock when editting
or writing on files.

This means that if the file is open by another editor, vi will warn
the user of the conflict. Multiple readers of the same file are
of course never warned, but any attempt to modify the file from
vi will produce an error message. The error message can be
bypassed of course with "w!" et al.

Note that seperate locks are kept on alternate and original files
used within vi, so all files referenced by vi are safe.

The main motivation of this is to allow "safe" use of possibly
backgrounded vi's, but it is in general quite useful on a busy system.

This also obviates things like vipw.

The changes work on 4.2 as well, but watch out for flock system bugs.

	Bill Jolitz
	Symmetric
	[email protected]

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.