diff options
author | Frank de Brabander <debrabander@gmail.com> | 2023-01-14 04:12:01 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-16 11:08:39 +0000 |
commit | bfa114bfa8040f38c247bb0d38f5aeee3595e819 (patch) | |
tree | aa43d8e726269d7daab8ca77220bde8fbb7bc36c /bitbake | |
parent | 075101eee19a3374193a77e7e761d4d8bb3271b4 (diff) | |
download | poky-bfa114bfa8040f38c247bb0d38f5aeee3595e819.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: 9779fad4d9e2540b24bb91cfa38fc1984402bef2)
Signed-off-by: Frank de Brabander <debrabander@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cfd7c9899f988bab6d9fe7bbfbdb60603fb5ed34)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 5d02c0b9f5..2a9fb6623c 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -248,8 +248,8 @@ class ProcessServer(): | |||
248 | # Remove the socket file so we don't get any more connections to avoid races | 248 | # Remove the socket file so we don't get any more connections to avoid races |
249 | try: | 249 | try: |
250 | os.unlink(self.sockname) | 250 | os.unlink(self.sockname) |
251 | except: | 251 | except Exception as err: |
252 | pass | 252 | serverlog("Removing socket file '%s' failed (%s)" % (self.sockname, err)) |
253 | self.sock.close() | 253 | self.sock.close() |
254 | 254 | ||
255 | try: | 255 | try: |
@@ -532,6 +532,7 @@ def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpc | |||
532 | 532 | ||
533 | # Create server control socket | 533 | # Create server control socket |
534 | if os.path.exists(sockname): | 534 | if os.path.exists(sockname): |
535 | serverlog("WARNING: removing existing socket file '%s'" % sockname) | ||
535 | os.unlink(sockname) | 536 | os.unlink(sockname) |
536 | 537 | ||
537 | sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | 538 | sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) |