From 4feddaea01a755bcabc331a7a20836bc319f8b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sat, 15 Aug 2009 04:28:53 +0200 Subject: First try of own mq-module --- portato/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'portato/__init__.py') 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() -- cgit v1.2.3