Add nodelete option for destroying handles 22/292722/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 12 May 2023 01:42:06 +0000 (01:42 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 12 May 2023 01:42:06 +0000 (01:42 +0000)
If the process unloads the rpc-port library, the process will be crashed by
the glib source. While calling elm_shutdown(), the glib source will be dispatched.
In that case, the process has crashed if the rpc-port library is unloaded.

Change-Id: I67354c0d7bc8d2ef51b363cb762f5c8132940783
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/CMakeLists.txt

index 46b286d..a783f49 100644 (file)
@@ -25,6 +25,8 @@ APPLY_PKG_CONFIG(${TARGET_RPC_PORT} PUBLIC
   UUID_DEPS
 )
 
+TARGET_LINK_LIBRARIES(${TARGET_RPC_PORT} PUBLIC "-Wl,-z,nodelete")
+
 INSTALL(TARGETS ${TARGET_RPC_PORT} DESTINATION ${LIB_INSTALL_DIR})
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include/
   DESTINATION include/rpc-port