diff --git a/scripts/fork-log-daemon b/scripts/fork-log-daemon index 665a60baf..debbc8938 100755 --- a/scripts/fork-log-daemon +++ b/scripts/fork-log-daemon @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os import select import signal import subprocess @@ -7,7 +8,12 @@ import sys import syslog def main(): - process = subprocess.Popen(sys.argv[1:], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + process = subprocess.Popen( + sys.argv[1:], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + env=dict(os.environ, PYTHONUNBUFFERED='1') + ) signal.signal(signal.SIGTERM, signal.SIG_IGN) write_to_stdout = True