summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorFrank de Brabander <debrabander@gmail.com>2022-12-14 17:09:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-17 23:50:13 +0000
commit3c6753d03d48ae73cdd4ee691be4b2f84ef9d875 (patch)
tree2c0f058fa9809f64f30f86edc62027ba430e2289 /bitbake/lib/bb/server
parentcaed08fe897dbda53151a6a7789dc6c38ccb4817 (diff)
downloadpoky-3c6753d03d48ae73cdd4ee691be4b2f84ef9d875.tar.gz
bitbake: process: log odd unlink events with bitbake.sock
Log when the socket file already exists and is removed before recreating a new socket. Log when unlinking the socket file failed. (Bitbake rev: cfd7c9899f988bab6d9fe7bbfbdb60603fb5ed34) Signed-off-by: Frank de Brabander <debrabander@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 44c65451fc..12498a6c47 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -278,8 +278,8 @@ class ProcessServer():
278 # Remove the socket file so we don't get any more connections to avoid races 278 # Remove the socket file so we don't get any more connections to avoid races
279 try: 279 try:
280 os.unlink(self.sockname) 280 os.unlink(self.sockname)
281 except: 281 except Exception as err:
282 pass 282 serverlog("Removing socket file '%s' failed (%s)" % (self.sockname, err))
283 self.sock.close() 283 self.sock.close()
284 284
285 try: 285 try:
@@ -543,6 +543,7 @@ def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpc
543 543
544 # Create server control socket 544 # Create server control socket
545 if os.path.exists(sockname): 545 if os.path.exists(sockname):
546 serverlog("WARNING: removing existing socket file '%s'" % sockname)
546 os.unlink(sockname) 547 os.unlink(sockname)
547 548
548 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 549 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)