if configParams.bind:
(host, port) = configParams.bind.split(':')
server.initServer((host, int(port)))
+ configuration.interface = [ server.serverImpl.host, server.serverImpl.port ]
else:
server.initServer()
+ configuration.interface = []
try:
configuration.setServerRegIdleCallback(server.getServerIdleCB())
self.lock = bb.utils.lockfile(lockfile, False, False)
if not self.lock:
bb.fatal("Only one copy of bitbake should be run against a build directory")
+ try:
+ self.lock.seek(0)
+ self.lock.truncate()
+ if len(configuration.interface) >= 2:
+ self.lock.write("%s:%s\n" % (configuration.interface[0], configuration.interface[1]));
+ self.lock.flush()
+ except:
+ pass
# TOSTOP must not be set or our children will hang when they output
fd = sys.stdout.fileno()
Constructor
"""
BaseImplServer.__init__(self)
+ if (interface[1] == 0): # anonymous port, not getting reused
+ self.single_use = True
+ # Use auto port configuration
+ if (interface[1] == -1):
+ interface = (interface[0], 0)
SimpleXMLRPCServer.__init__(self, interface,
requestHandler=BitBakeXMLRPCRequestHandler,
logRequests=False, allow_none=True)
self.autoregister_all_functions(self.commands, "")
self.interface = interface
self.single_use = False
- if (interface[1] == 0): # anonymous port, not getting reused
- self.single_use = True
def addcooker(self, cooker):
BaseImplServer.addcooker(self, cooker)