From 80199319f042b40cf7c46cb779dcc2aa6e3b6498 Mon Sep 17 00:00:00 2001 From: "qcqcqc@wsl" <1220204124@zust.edu.cn> Date: Thu, 10 Apr 2025 11:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E6=97=B6=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=B8=85=E7=90=86=E5=85=B1=E4=BA=AB=E5=86=85=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/init_cleanup.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/init_cleanup.c b/src/init_cleanup.c index a49dd3e..dcab9c4 100644 --- a/src/init_cleanup.c +++ b/src/init_cleanup.c @@ -25,14 +25,14 @@ __attribute__((destructor)) void cleanup_shared_memory() { DEBUG_LOG("Log file: %s", LOG_FILE); DEBUG_LOG("Log out file: %s", LOG_OUT_FILE); DEBUG_LOG("Shared memory ID: %d", shm_id); - if (shared_config != NULL) { - DEBUG_LOG("Cleaning up shared memory."); - // Detach shared memory segment - if (shmdt(shared_config) == -1) { - perror("shmdt failed"); - } - shared_config = NULL; - } + // if (shared_config != NULL) { + // DEBUG_LOG("Cleaning up shared memory."); + // // Detach shared memory segment + // if (shmdt(shared_config) == -1) { + // perror("shmdt failed"); + // } + // shared_config = NULL; + // } #ifdef DEBUG // print_stacktrace(); #endif