summaryrefslogtreecommitdiff
path: root/portato/__init__.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-15 04:28:53 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-15 04:28:53 +0200
commit4feddaea01a755bcabc331a7a20836bc319f8b3e (patch)
tree5eaf7f377d0a6520ac97fea9a096c9aca7dfddd8 /portato/__init__.py
parent5355e5ad97e9c235c0cb1aecabae3b4fd38eea2a (diff)
downloadportato-4feddaea01a755bcabc331a7a20836bc319f8b3e.tar.gz
portato-4feddaea01a755bcabc331a7a20836bc319f8b3e.tar.bz2
portato-4feddaea01a755bcabc331a7a20836bc319f8b3e.zip
First try of own mq-module
Diffstat (limited to '')
-rw-r--r--portato/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/portato/__init__.py b/portato/__init__.py
index ae50929..bc1783b 100644
--- a/portato/__init__.py
+++ b/portato/__init__.py
@@ -89,12 +89,12 @@ def start():
else: # start us again in root modus and launch listener
- from . import sysv_ipc as ipc
+ from . import mq
- mq = ipc.MessageQueue(None, ipc.IPC_CREX)
+ _mq = mq.MessageQueue(None, mq.MessageQueue.CREAT | mq.MessageQueue.EXCL)
# start listener
- lt = threading.Thread(target=get_listener().set_recv, args = (mq,))
+ lt = threading.Thread(target=get_listener().set_recv, args = (_mq,))
lt.setDaemon(False)
lt.start()
@@ -106,7 +106,7 @@ def start():
su = detect_su_command()
if su:
debug("Using '%s' as su command.", su.bin)
- cmd = su.cmd("%s --no-fork --mq %ld" % (sys.argv[0], mq.key))
+ cmd = su.cmd("%s --no-fork --mq %ld" % (sys.argv[0], _mq.key))
sp = subprocess.Popen(cmd, env = env)
@@ -126,4 +126,4 @@ def start():
get_listener().close()
lt.join()
- mq.remove()
+ _mq.remove()