Skip to content

Commit

Permalink
ignore select interrupt when waiting for data
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 committed Sep 23, 2024
1 parent 54d7f39 commit 3c240f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hnsw/external_index_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ static void wait_for_data(external_index_socket_t *socket_con)
CHECK_FOR_INTERRUPTS();

if(activity < 0) {
// Sometimes the select syscall may be interrupted by signals
// If this signals are important they would be handled in CHECK_FOR_INTERRUPTS()
// If after calling CHECK_FOR_INTERRUPTS() we are still here we can ignore the signal
if(errno == EINTR) continue;
snprintf((char *)&errstr, EXTERNAL_INDEX_MAX_ERR_SIZE, "%s", strerror(errno));
elog(ERROR, "select syscall error: %s", errstr);
}
Expand Down

0 comments on commit 3c240f2

Please sign in to comment.