Commit 5168d564 authored by Ramon Nou's avatar Ramon Nou
Browse files

fix(client): restore proper closing braces in preload.cpp destroy_preload

parent 9f4387ed
Loading
Loading
Loading
Loading
Loading
+13 −7
Changes for src/client/preload.cpp: 13 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -911,12 +911,13 @@ destroy_preload() {
#ifndef BYPASS_SYSCALL
        LOG(DEBUG, "Syscall interception stopped");
#endif
    }

    if(CTX->two_tier_cas_enabled()) {
        CTX->destroy_two_tier_cas();
    }

        const char* clean_rpc_shutdown =
                std::getenv("LIBGKFS_CLEAN_RPC_SHUTDOWN");
    const char* clean_rpc_shutdown = std::getenv("LIBGKFS_CLEAN_RPC_SHUTDOWN");
    if(clean_rpc_shutdown != nullptr &&
       (std::strcmp(clean_rpc_shutdown, "1") == 0 ||
        std::strcmp(clean_rpc_shutdown, "ON") == 0 ||
@@ -960,7 +961,8 @@ destroy_preload() {
 * @brief External functions to call linking the library
 *
 */
    extern "C" int gkfs_init() {
extern "C" int
gkfs_init() {
    CTX->init_logging();
    // from here ownwards it is safe to print messages
    LOG(DEBUG, "Logging subsystem initialized");
@@ -975,22 +977,26 @@ destroy_preload() {
}


    extern "C" int gkfs_end() {
extern "C" int
gkfs_end() {
    destroy_preload();
    return 0;
}

    void at_fork() {
void
at_fork() {
    // Do not destroy the context in the parent.
    // destroying and recreating the context in the parent during fork
    // is dangerous for multi-threaded applications (like JVM) and can cause
    // crashes in Argobots/Margo at exit.
}
    void at_parent() {
void
at_parent() {
    // Do not re-init in the parent.
}

    void at_child() {
void
at_child() {
    if(gkfs::env::var_is_set(gkfs::env::ENABLE_FORK)) {
        LOG(WARNING,
            "Fork interception enabled. Re-initializing GekkoFS client...");