Commit 721739e2 authored by Benjamin Baer's avatar Benjamin Baer
Browse files

zombies killed

parent b8474102
......@@ -34,12 +34,12 @@ class LogoutUser(managementagent.RabbitModule):
for username in usernames:
logger.debug('trying to kill user %s', username)
process = subprocess.Popen(['/usr/bin/pkill', '-u', username, ' tl-xinit'])
returnCode = subprocess.call(['/usr/bin/pkill', '-u', username, ' tl-xinit'])
process.wait()
time.sleep(5)
subprocess.Popen(['/usr/bin/pkill', '-u', username, '-KILL'])
subprocess.call(['/usr/bin/pkill', '-u', username, '-KILL'])
if process.returncode != 0:
if returnCode != 0:
logger.warning("Failed to logout user %s", username)
self.send_reply(reply_to, process.returncode, "Error executing pkill command (%i) for user %s" % (process.returncode, username))
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment