extern void reconfig() { read_slurmdbd_conf(); assoc_mgr_set_missing_uids(); acct_storage_g_reconfig(NULL, 0); _update_logging(false); }
/* _signal_handler - Process daemon-wide signals */ static void *_signal_handler(void *no_data) { int rc, sig; int sig_array[] = {SIGINT, SIGTERM, SIGHUP, SIGABRT, 0}; sigset_t set; (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); /* Make sure no required signals are ignored (possibly inherited) */ _default_sigaction(SIGINT); _default_sigaction(SIGTERM); _default_sigaction(SIGHUP); _default_sigaction(SIGABRT); while (1) { xsignal_sigset_create(sig_array, &set); rc = sigwait(&set, &sig); if (rc == EINTR) continue; switch (sig) { case SIGHUP: /* kill -1 */ info("Reconfigure signal (SIGHUP) received"); read_slurmdbd_conf(); assoc_mgr_set_missing_uids(); acct_storage_g_reconfig(NULL); _update_logging(false); break; case SIGINT: /* kill -2 or <CTRL-C> */ case SIGTERM: /* kill -15 */ info("Terminate signal (SIGINT or SIGTERM) received"); shutdown_threads(); return NULL; /* Normal termination */ case SIGABRT: /* abort */ info("SIGABRT received"); abort(); /* Should terminate here */ shutdown_threads(); return NULL; default: error("Invalid signal (%d) received", sig); } } }
/* * reconfigure the slurmdbd * RET: List of config_key_pairs_t * * note List needs to be freed when called */ extern int slurmdb_reconfig(void *db_conn) { return acct_storage_g_reconfig(db_conn, 1); }