aboutsummaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-16 18:01:02 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-16 18:01:02 +0200
commit221fe0a619ce1d02f5b31d85c9e472983a6f37a9 (patch)
tree4cf5bc90b5c9f7236338cbedb214002a59cd18d0 /src/__main__.py
parentinfo: barriers (diff)
downloadcmdipc-221fe0a619ce1d02f5b31d85c9e472983a6f37a9.tar.gz
cmdipc-221fe0a619ce1d02f5b31d85c9e472983a6f37a9.tar.bz2
cmdipc-221fe0a619ce1d02f5b31d85c9e472983a6f37a9.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rwxr-xr-xsrc/__main__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/__main__.py b/src/__main__.py
index a618706..b835aee 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -384,12 +384,12 @@ try:
if parser.opts['--timeout'] is not None: timeout = float(parser.opts['--timeout'][0])
m = ipc.Semaphore(key[0], flags, mode, 1)
i = ipc.Semaphore(key[1], flags, mode, 0)
- q = ipc.MessageQueue(key[2], flags, mode, spool, size)
if use_posix:
- p = ipc.Semaphore(key[3], flags, mode, 0)
+ p = ipc.Semaphore(key[2], flags, mode, 0)
+ q = ipc.MessageQueue(key[3 if use_posix else 2], flags, mode, spool, size)
if key[0] is None:
if use_posix:
- print('key: %s' % ipc.keycat(m.key, i.key, q.key, p.key))
+ print('key: %s' % ipc.keycat(m.key, i.key, p.key, q.key))
else:
print('key: %s' % ipc.keycat(m.key, i.key, q.key))
nocmd = False
@@ -425,15 +425,15 @@ try:
if parser.opts['--remove'] is not None:
m.remove()
i.remove()
- q.remove()
if use_posix:
p.remove()
+ q.remove()
elif nocmd:
m.close()
i.close()
- q.close()
if use_posix:
p.close()
+ q.close()
print('Invalid command given', file = sys.stderr)
sys.exit(1)