diff options
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/bb/main.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/server/process.py | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index eba4aefb54..0418d52b84 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
@@ -259,8 +259,10 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): | |||
259 | help="The name/address for the bitbake xmlrpc server to bind to.") | 259 | help="The name/address for the bitbake xmlrpc server to bind to.") |
260 | 260 | ||
261 | parser.add_option("-T", "--idle-timeout", type=float, dest="server_timeout", | 261 | parser.add_option("-T", "--idle-timeout", type=float, dest="server_timeout", |
262 | default=os.environ.get("BB_SERVER_TIMEOUT", 0) or None, | 262 | default=os.getenv("BB_SERVER_TIMEOUT"), |
263 | help="Set timeout to unload bitbake server due to inactivity") | 263 | help="Set timeout to unload bitbake server due to inactivity, " |
264 | "set to -1 means no unload, " | ||
265 | "default: Environment variable BB_SERVER_TIMEOUT.") | ||
264 | 266 | ||
265 | parser.add_option("", "--no-setscene", action="store_true", | 267 | parser.add_option("", "--no-setscene", action="store_true", |
266 | dest="nosetscene", default=False, | 268 | dest="nosetscene", default=False, |
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 5b8a549f94..338c44835e 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -180,7 +180,8 @@ class ProcessServer(multiprocessing.Process): | |||
180 | if self.timeout is None: | 180 | if self.timeout is None: |
181 | print("No timeout, exiting.") | 181 | print("No timeout, exiting.") |
182 | self.quit = True | 182 | self.quit = True |
183 | if not self.haveui and self.lastui and self.timeout and (self.lastui + self.timeout) < time.time(): | 183 | if not self.timeout == -1.0 and not self.haveui and self.lastui and self.timeout and \ |
184 | (self.lastui + self.timeout) < time.time(): | ||
184 | print("Server timeout, exiting.") | 185 | print("Server timeout, exiting.") |
185 | self.quit = True | 186 | self.quit = True |
186 | 187 | ||