summaryrefslogtreecommitdiff
path: root/src/leap/platform_init
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-05-07 16:08:55 -0300
committerTomas Touceda <chiiph@leap.se>2013-05-07 16:08:55 -0300
commit4cc3c7d3f0d63d97df0d40c3e2d0941c5e069eb9 (patch)
treedfabf2a91cd8466b572539b73d38273eef733339 /src/leap/platform_init
parent76641e028f4a8b6c5c89ad0e9ff4bfecc075d678 (diff)
parente6b7d52d827109d6fc8d79a28e8d46964e1ad94c (diff)
Merge remote-tracking branch 'kali/feature/update-docs' into develop
Diffstat (limited to 'src/leap/platform_init')
-rw-r--r--src/leap/platform_init/locks.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/leap/platform_init/locks.py b/src/leap/platform_init/locks.py
index f1672d8e..e5b392a3 100644
--- a/src/leap/platform_init/locks.py
+++ b/src/leap/platform_init/locks.py
@@ -74,7 +74,7 @@ if platform_init.IS_UNIX:
"""
Tries to get a lock, returning True if successful
- @rtype: bool
+ :rtype: bool
"""
self._fd = os.open(self.path, os.O_CREAT | os.O_RDWR)
@@ -98,7 +98,7 @@ if platform_init.IS_UNIX:
Returns True if the pid in the pidfile
is ours.
- @rtype: bool
+ :rtype: bool
"""
gotit, pid = self._get_lock_and_pid()
return pid == os.getpid()
@@ -108,7 +108,7 @@ if platform_init.IS_UNIX:
Tries to get a lock over the file.
Returns (locked, pid) tuple.
- @rtype: tuple
+ :rtype: tuple
"""
if self._get_lock():
@@ -192,7 +192,7 @@ if platform_init.IS_WIN:
Returns True, pid if there is only one pidfile with the expected
base path
- @rtype: tuple
+ :rtype: tuple
"""
pidfiles = glob.glob(self.LOCKBASE + '-*')
if len(pidfiles) == 1:
@@ -205,7 +205,7 @@ if platform_init.IS_WIN:
"""
Returns the pid of the locking process
- @rtype: int
+ :rtype: int
"""
# XXX assert there is only one?
_, pid = self._is_one_pidfile()
@@ -238,7 +238,7 @@ if platform_init.IS_WIN:
Returns True if the pid in the pidfile
is ours.
- @rtype: bool
+ :rtype: bool
"""
_, pid = self._is_one_pidfile()
return pid == self.pid
@@ -248,7 +248,7 @@ if platform_init.IS_WIN:
Writes the port for windows control to the pidfile folder
Returns True if successful.
- @rtype: bool
+ :rtype: bool
"""
if not self.locked_by_us:
logger.warning("Tried to write control port to a "
@@ -264,7 +264,7 @@ if platform_init.IS_WIN:
Reads control port of the main instance from the port file
in the pidfile dir
- @rtype: int
+ :rtype: int
"""
pid = self.get_pid()
port_file = os.path.join(self.LOCKBASE + "-%s" % pid, "port")
@@ -288,7 +288,7 @@ def we_are_the_one_and_only():
If we came later, send a raise signal to the main instance of the
application
- @rtype: bool
+ :rtype: bool
"""
_sys = platform.system()