From 567cace5f8b4a6fbbd1139c4b64bedc5ac7b5255 Mon Sep 17 00:00:00 2001 From: Ludvig Strigeus Date: Sun, 16 Dec 2018 17:17:13 +0100 Subject: [PATCH] Handle EINTR to select() --- network_bsd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/network_bsd.cpp b/network_bsd.cpp index bcc7b90..95283d7 100644 --- a/network_bsd.cpp +++ b/network_bsd.cpp @@ -613,6 +613,8 @@ void *UnixSocketDeletionWatcher::RunThreadInner() { FD_SET(pipes_[0], &fdset); int n = select(std::max(inotify_fd_, pipes_[0]) + 1, &fdset, NULL, NULL, NULL); if (n == -1) { + if (errno == EINTR) + continue; perror("select"); break; }