From: Frank de Brabander <debrabander@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Frank de Brabander <debrabander@gmail.com>
Subject: [PATCH] process: log odd unlink events with bitbake.sock
Date: Wed, 14 Dec 2022 17:09:46 +0100 [thread overview]
Message-ID: <20221214160946.19456-1-debrabander@gmail.com> (raw)
Log when the socket file already exists and is removed before
recreating a new socket.
Log when unlinking the socket file failed.
Signed-off-by: Frank de Brabander <debrabander@gmail.com>
---
lib/bb/server/process.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 44c65451..12498a6c 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -278,8 +278,8 @@ class ProcessServer():
# Remove the socket file so we don't get any more connections to avoid races
try:
os.unlink(self.sockname)
- except:
- pass
+ except Exception as err:
+ serverlog("Removing socket file '%s' failed (%s)" % (self.sockname, err))
self.sock.close()
try:
@@ -543,6 +543,7 @@ def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpc
# Create server control socket
if os.path.exists(sockname):
+ serverlog("WARNING: removing existing socket file '%s'" % sockname)
os.unlink(sockname)
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
--
2.20.1
reply other threads:[~2022-12-14 16:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221214160946.19456-1-debrabander@gmail.com \
--to=debrabander@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.