diff options
Diffstat (limited to 'bitbake/bin/bitbake-server')
-rwxr-xr-x | bitbake/bin/bitbake-server | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-server b/bitbake/bin/bitbake-server index 454a3919aa..a559109e3f 100755 --- a/bitbake/bin/bitbake-server +++ b/bitbake/bin/bitbake-server | |||
@@ -9,6 +9,7 @@ import os | |||
9 | import sys | 9 | import sys |
10 | import warnings | 10 | import warnings |
11 | warnings.simplefilter("default") | 11 | warnings.simplefilter("default") |
12 | warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*use.of.fork.*may.lead.to.deadlocks.in.the.child.*") | ||
12 | import logging | 13 | import logging |
13 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) | 14 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) |
14 | 15 | ||
@@ -38,9 +39,9 @@ if xmlrpcinterface[0] == "None": | |||
38 | with open('/dev/null', 'r') as si: | 39 | with open('/dev/null', 'r') as si: |
39 | os.dup2(si.fileno(), sys.stdin.fileno()) | 40 | os.dup2(si.fileno(), sys.stdin.fileno()) |
40 | 41 | ||
41 | so = open(logfile, 'a+') | 42 | with open(logfile, 'a+') as so: |
42 | os.dup2(so.fileno(), sys.stdout.fileno()) | 43 | os.dup2(so.fileno(), sys.stdout.fileno()) |
43 | os.dup2(so.fileno(), sys.stderr.fileno()) | 44 | os.dup2(so.fileno(), sys.stderr.fileno()) |
44 | 45 | ||
45 | # Have stdout and stderr be the same so log output matches chronologically | 46 | # Have stdout and stderr be the same so log output matches chronologically |
46 | # and there aren't two seperate buffers | 47 | # and there aren't two seperate buffers |