mirror of https://github.com/fail2ban/fail2ban
- 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-b1dcaea8d6050.x
parent
b5abd7f2f2
commit
d30cfd2095
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue