From c962ef6e909f5fdec0eec952551f7945c9dac013 Mon Sep 17 00:00:00 2001 From: jette <jette@schedmd.com> Date: Thu, 22 Aug 2013 13:29:03 -0700 Subject: [PATCH] Clear some pthread values after join This will prevent possible confusion for the backup controller when it switches from primary back to backup modes since those pthread IDs are no longer value. Note the thred_id_rpc could be used by the backup controller after returning to backup mode --- src/slurmctld/controller.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 9e7f84ccf18..6e351ecc078 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -585,6 +585,9 @@ int main(int argc, char *argv[]) pthread_join(slurmctld_config.thread_id_sig, NULL); pthread_join(slurmctld_config.thread_id_rpc, NULL); pthread_join(slurmctld_config.thread_id_save, NULL); + slurmctld_config.thread_id_sig = (pthread_t) 0; + slurmctld_config.thread_id_rpc = (pthread_t) 0; + slurmctld_config.thread_id_save = (pthread_t) 0; if (running_cache) { /* break out and end the association cache -- GitLab