Package rhn :: Module rhnLockfile :: Class Lockfile
[hide private]
[frames] | no frames]

Class Lockfile

source code

class that provides simple access to a PID-style lockfile.

methods: __init__(lockfile), acquire(), and release() NOTE: currently acquires upon init The *.pid file will be acquired, or an LockfileLockedException is raised.

Instance Methods [hide private]
 
__init__(self, lockfile, pid=None)
create (if need be), and acquire lock on lockfile
source code
 
acquire(self)
acquire the lock; else raise LockfileLockedException.
source code
 
release(self) source code
Method Details [hide private]

__init__(self, lockfile, pid=None)
(Constructor)

source code 

create (if need be), and acquire lock on lockfile

lockfile example: '/var/run/up2date.pid'