From d30cfd209598a7cb879f0b2958832659bf5ec8e9 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Thu, 21 Sep 2006 22:38:21 +0000 Subject: [PATCH] - subprocess.call deadlocks when execute action with multi-jails git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@380 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- server/action.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/action.py b/server/action.py index 736163d9..6d10c3df 100644 --- a/server/action.py +++ b/server/action.py @@ -24,7 +24,7 @@ __date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" -import time, logging +import time, logging, os from subprocess import call # Gets the instance of the logger. @@ -213,7 +213,9 @@ class Action: def executeCmd(realCmd): logSys.debug(realCmd) try: - retcode = call(realCmd, shell=True) + # The following line gives deadlock with multiple jails + #retcode = call(realCmd, shell=True) + retcode = os.system(realCmd) if retcode < 0: logSys.error("%s returned %x" % (realCmd, -retcode)) else: