From ff3d96c9deb258fdf3eed30f9166d594c6ed3e13 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 24 Feb 2024 07:33:56 +0100 Subject: [PATCH] Fix the shared memory cleaning script (#4369) (#4425) Fix the invalid regular expression that leads to skipping the processing of shared lock files. Signed-off-by: Artem Shumov (cherry picked from commit 8c3e3b30e769ef94bdbc04da519ed193855ad05c) Co-authored-by: Artem Shumov --- tools/fastdds/shm/clean.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fastdds/shm/clean.py b/tools/fastdds/shm/clean.py index 1c4252f0c00..d0196176dba 100644 --- a/tools/fastdds/shm/clean.py +++ b/tools/fastdds/shm/clean.py @@ -91,7 +91,7 @@ def __clean_zombie_segments(self): The deleted file names """ - segment_lock_re = re.compile('^fastrtps_(\\d|[a-z]){16}_el|_sl') + segment_lock_re = re.compile('^fastrtps_(\\d|[a-z]){16}(_el|_sl)') # Each segment has an "_el" lock file that is locked if the segment # is open and the owner process is alive @@ -123,7 +123,7 @@ def __clean_zombie_ports(self): the deleted file names """ - port_lock_re = re.compile('^fastrtps_port\\d{,5}_el|_sl') + port_lock_re = re.compile('^fastrtps_port\\d{,5}(_el|_sl)') # Each port has an "_el | _sl" lock file that is locked if the port # is open and the owner process is alive port_locks = [