diff --git a/CMakeLists.txt b/CMakeLists.txt index 647aca686ab568e5ac283be813c8dfc1bfbe7390..7903f7fbf3a5d3568d934aeba529e070a7903e78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11) SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_VERSION_MAJOR 4) SET( CPACK_PACKAGE_VERSION_MINOR 3) -SET( CPACK_PACKAGE_VERSION_PATCH 42) +SET( CPACK_PACKAGE_VERSION_PATCH 46) # # init CellFrame SDK diff --git a/cellframe-sdk b/cellframe-sdk index b10f05814274c333818770c4ff7f3341d7db9381..01bcfa7825e605f04dcfb1317482440e3dd99d43 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit b10f05814274c333818770c4ff7f3341d7db9381 +Subproject commit 01bcfa7825e605f04dcfb1317482440e3dd99d43 diff --git a/sources/sig_unix_handler.c b/sources/sig_unix_handler.c index 4610804bf85ddc16998ca9e623d8b0ad33ab3fc8..a10258f7417a6154c28580ff235fa8e0eec129be 100644 --- a/sources/sig_unix_handler.c +++ b/sources/sig_unix_handler.c @@ -2,6 +2,7 @@ #include <stdio.h> #include <string.h> #include "dap_common.h" +#include "dap_file_utils.h" #include "sig_unix_handler.h" #define LOG_TAG "sig_unix_handler" @@ -22,8 +23,19 @@ _Noreturn static void sig_exit_handler(int sig_code) { exit(0); } -int sig_unix_handler_init(const char *pid_path) { - l_pid_path = strdup(pid_path); +/** + * @brief sig_unix_handler_init + * @param a_pid_path + * @return + */ +int sig_unix_handler_init(const char *a_pid_path) +{ + char * l_pid_dir = dap_path_get_dirname(a_pid_path); + sleep(1); + dap_mkdir_with_parents(l_pid_dir); + DAP_DELETE(l_pid_dir); + + l_pid_path = strdup(a_pid_path); signal(SIGINT, sig_exit_handler); signal(SIGTERM, sig_exit_handler); signal(SIGHUP, sig_exit_handler);