- Fixed exception if trying to kill Fail2Ban with a fail2ban.pid file present. Thanks to K�vin Drapel

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@99 a942ae1a-1317-0410-a47c-b1dcaea8d605
This commit is contained in:
lostcontrol 2005-03-31 16:04:52 +00:00
parent 781564f711
commit db3a9d9001

View file

@ -203,7 +203,12 @@ def killPID(pid):
""" Kills the process with the given PID using the
INT signal (same effect as <ctrl>+<c>).
"""
return os.kill(pid, 2)
try:
return os.kill(pid, 2)
except OSError:
logSys.error("Can not kill process " + `pid` + ". Please check that " +
"Fail2Ban is not running and remove the file " +
"'/tmp/fail2ban.pid'")
if __name__ == "__main__":