Skip to content
Snippets Groups Projects
Commit 0dc2499f authored by Danny Auble's avatar Danny Auble
Browse files

BGQ - fixed ending of message thread in a way that made srun not lock up.

parent d0ba4c4a
No related branches found
No related tags found
No related merge requests found
...@@ -488,7 +488,7 @@ int srun(int ac, char **av) ...@@ -488,7 +488,7 @@ int srun(int ac, char **av)
_send_step_complete_rpc(global_rc); _send_step_complete_rpc(global_rc);
if (msg_thread) { if (msg_thread) {
srun_shutdown = true; srun_shutdown = true;
pthread_kill(msg_thread, SIGINT); pthread_cancel(msg_thread);
pthread_join(msg_thread, NULL); pthread_join(msg_thread, NULL);
} }
#else #else
...@@ -1123,6 +1123,9 @@ static void *_msg_thr_internal(void *arg) ...@@ -1123,6 +1123,9 @@ static void *_msg_thr_internal(void *arg)
slurm_msg_t *msg; slurm_msg_t *msg;
int *slurmctld_fd_ptr = (int *)arg; int *slurmctld_fd_ptr = (int *)arg;
(void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
(void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
while (!srun_shutdown) { while (!srun_shutdown) {
newsockfd = slurm_accept_msg_conn(*slurmctld_fd_ptr, &cli_addr); newsockfd = slurm_accept_msg_conn(*slurmctld_fd_ptr, &cli_addr);
if (newsockfd == SLURM_SOCKET_ERROR) { if (newsockfd == SLURM_SOCKET_ERROR) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment