summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-server
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin/bitbake-server')
-rwxr-xr-xbitbake/bin/bitbake-server7
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
9import sys 9import sys
10import warnings 10import warnings
11warnings.simplefilter("default") 11warnings.simplefilter("default")
12warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*use.of.fork.*may.lead.to.deadlocks.in.the.child.*")
12import logging 13import logging
13sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) 14sys.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":
38with open('/dev/null', 'r') as si: 39with open('/dev/null', 'r') as si:
39 os.dup2(si.fileno(), sys.stdin.fileno()) 40 os.dup2(si.fileno(), sys.stdin.fileno())
40 41
41so = open(logfile, 'a+') 42with open(logfile, 'a+') as so:
42os.dup2(so.fileno(), sys.stdout.fileno()) 43 os.dup2(so.fileno(), sys.stdout.fileno())
43os.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