- 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
0.x
Cyril Jaquier 2006-09-21 22:38:21 +00:00
parent b5abd7f2f2
commit d30cfd2095
1 changed files with 4 additions and 2 deletions

View File

@ -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: