I would like to lock files to allow multiple access
across a network of Decs and Suns, etc. I figure that
the fcntl call would be best since it does allow
NFS locking for both read and write. I have a small
program that tests the locking and for the most part
it works just fine. The problem that I'm having is
when I interrupt the program with a control/C. Is
stops but does not appear to release the lock. This
occurs in several other ways too. (quitting dbx while
a lock is in effect does it, seg faults, etc). I need
the lock to be released when the pgm terminates. I know
the man pages says that the lock is released, but the
next time I start the program, it waits for a lock
and never returns. I have to delete the file to release
the lock. The behaviour is the same on both Dec/Ultrix
4.2A and SunOs Sc2.0.1 so it doesn't appear to be a bug
in the OS (but maybe).
Does anyone out there in netland have an idea on why
this is occurring.
All your help is appreciated.
Chevron Petroleum Technology Co.
Earth Model/Interpretation & Analysis Division.
P.O. Box 42832, Houston, TX, 77242-2832
Phone: (713) 596-2059 Fax: (713) 596-3009