summaryrefslogtreecommitdiffstats
path: root/avahi-common
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-common')
-rw-r--r--avahi-common/simple-watch.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
index 56c2ccb..8df18dd 100644
--- a/avahi-common/simple-watch.c
+++ b/avahi-common/simple-watch.c
@@ -521,9 +521,19 @@ int avahi_simple_poll_run(AvahiSimplePoll *s) {
s->state = STATE_RUNNING;
- if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
- s->state = STATE_FAILURE;
- return -1;
+ for (;;) {
+ errno = 0;
+
+ if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
+
+ if (errno == EINTR)
+ continue;
+
+ s->state = STATE_FAILURE;
+ return -1;
+ }
+
+ break;
}
/* The poll events are now valid again */