mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-05-13 14:36:43 +00:00
explicit flush stdout/stderr before exit, because of possible buffered output in python (echo or grep fail2ban-client --version can sometimes returns nothing)
This commit is contained in:
parent
683f8fc56c
commit
41e3f2e5ed
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue