summaryrefslogtreecommitdiff
path: root/osdep
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2018-10-25 20:44:32 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2018-10-25 20:44:32 -0700
commitc56831767eb8ee31b34964ffcb06f2d77e60e59a (patch)
tree6b6fec46cdbe6f0732955d9ec72e4b7057263104 /osdep
parent72a724f07536cfea7bb9a299cf503143124bd4bd (diff)
downloadinfinitytier-c56831767eb8ee31b34964ffcb06f2d77e60e59a.tar.gz
infinitytier-c56831767eb8ee31b34964ffcb06f2d77e60e59a.zip
Fix Mac tap agent abort on EINTR.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/MacEthernetTapAgent.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/osdep/MacEthernetTapAgent.c b/osdep/MacEthernetTapAgent.c
index 871b3d40..ca1f7a4e 100644
--- a/osdep/MacEthernetTapAgent.c
+++ b/osdep/MacEthernetTapAgent.c
@@ -336,6 +336,10 @@ int main(int argc,char **argv)
FD_SET(STDIN_FILENO,&rfds);
FD_SET(s_bpffd,&rfds);
if (select(s_bpffd+1,&rfds,&wfds,&efds,(struct timeval *)0) < 0) {
+ if ((errno == EAGAIN)||(errno == EINTR)) {
+ usleep(10);
+ continue;
+ }
return ZT_MACETHERNETTAPAGENT_EXIT_CODE_READ_ERROR;
}