From 5e9597e6295f9fa4b20588591a1fc746310a1270 Mon Sep 17 00:00:00 2001 From: Artem Shumov Date: Thu, 22 Feb 2024 09:55:41 +0300 Subject: [PATCH] Fix the shared memory cleaning script (#4369) 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) --- 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 = [