try to fix stdout broken pipe

master
Kevin Froman 2019-09-28 23:53:15 -05:00
parent e3b8e12dfb
commit e310ffc4e2
1 changed files with 8 additions and 2 deletions

View File

@ -114,8 +114,14 @@ def daemon():
except KeyboardInterrupt:
pass
cleanup.delete_run_files()
sys.stderr.close()
sys.stdout.close()
try:
sys.stderr.close()
except (IOError, BrokenPipeError) as e:
pass
try:
sys.stdout.close()
except (IOError, BrokenPipeError) as e:
pass
def _ignore_sigint(sig, frame):
'''This space intentionally left blank'''