mirror of https://github.com/fail2ban/fail2ban
explicit flush stdout/stderr before exit, because of possible buffered output in python (echo or grep `fail2ban-client --version` can sometimes returns nothing)
parent
683f8fc56c
commit
41e3f2e5ed
|
@ -270,6 +270,10 @@ class Fail2banCmdLine():
|
|||
@staticmethod
|
||||
def exit(code=0):
|
||||
logSys.debug("Exit with code %s", code)
|
||||
# because of possible buffered output in python, we should flush it before exit:
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
# exit
|
||||
Fail2banCmdLine._exit(code)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue