[Thread Prev][Thread Next][Thread Index]

Re: CAUTION!!!! Re: SOLARIS 7 start/stop script for PilotManager v1.107



You don't lock the file. You lock the record in the file. The stale lock
file problem goes away. The record automatically unlocks when the process
who is the record locker goes away.

-- 
----------Time flies like the wind. Fruit flies like a banana.----------------
--------Stranger things have happened but none stranger than this.-------------
Steven W. Orr      steveo@xxxxxxxxxxxxx     <site of former bang addr:-)>
---------------"Listen to me! We are all individuals."-------------------------

On Fri, 12 Mar 1999, Jim Koelkebeck wrote:

=>Alan Harder wrote:
=>> 
=>> > Is there some technical reason why the daemon cannot check for itself (lock
=>> > file) when running and avoid such a (forgive me) kludge?
=>> 
=>> I made a minimal effort at trying to detect if the serial port already had
=>> a daemon listening on it, but pilot-link didn't provide any useful error
=>> messages..
=>
=>
=>
=>> A lock file could work, but then of course you have stale lock problems......
=>
=>If you mean that the process that wrote the lock file died, put the PID of the
=>owner of the lock file in the file.  Check for the existence of the lock file
=>and
=>the existence of the process with the PID found in the lock file.  It just seems
=>brutal to zap a perfectly good daemon...
=>
=>Jim


SourceForge.net Logo