diff --git a/src/salloc/salloc.c b/src/salloc/salloc.c index 45bea337e258b3b58cc46a86e3ab39bc6c0a10c1..35d4e6663e56966125426b01019f5afaa526c88d 100644 --- a/src/salloc/salloc.c +++ b/src/salloc/salloc.c @@ -109,6 +109,7 @@ pthread_mutex_t allocation_state_lock = PTHREAD_MUTEX_INITIALIZER; static bool exit_flag = false; static bool suspend_flag = false; static bool allocation_interrupted = false; +static bool allocation_revoked = false; static uint32_t pending_job_id = 0; static time_t last_timeout = 0; static struct termios saved_tty_attributes; @@ -891,7 +892,7 @@ static void _job_complete_handler(srun_job_complete_msg_t *comp) } else { info("Job allocation %u has been revoked.", comp->job_id); - allocation_interrupted = true; + allocation_revoked = true; } } allocation_state = REVOKED; @@ -1059,7 +1060,7 @@ static int _wait_bluegene_block_ready(resource_allocation_response_msg_t *alloc) is_ready = 1; break; } - if (allocation_interrupted) + if (allocation_interrupted || allocation_revoked) break; } if (is_ready) @@ -1164,7 +1165,7 @@ static int _wait_nodes_ready(resource_allocation_response_msg_t *alloc) is_ready = 1; break; } - if (allocation_interrupted) + if (allocation_interrupted || allocation_revoked) break; } if (is_ready) {