diff --git a/source/daemons/qmaster/sge_thread_scheduler.cc b/source/daemons/qmaster/sge_thread_scheduler.cc index 4ce5e620a..d29b9e40c 100644 --- a/source/daemons/qmaster/sge_thread_scheduler.cc +++ b/source/daemons/qmaster/sge_thread_scheduler.cc @@ -437,6 +437,8 @@ sge_scheduler_terminate(lList **answer_list) { sge_mutex_unlock("master scheduler struct", __func__, __LINE__, &(Master_Scheduler.mutex)); + pthread_join(thread_id, nullptr); + INFO(MSG_THREAD_XTERMINATED_S, threadnames[SCHEDD_THREAD]); answer_list_add(answer_list, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_INFO); } else {