diff --git a/AUTHORS b/AUTHORS index 1a7a4aceb5..a9accb20c8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -253,6 +253,7 @@ Patches have also been contributed by: Ata E Husain Bohra Ján Tomko Richa Marwaha + Peter Feiner [....send patches to get your name here....] diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 2530ffaecf..42bdc54d45 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1,7 +1,7 @@ /* * virnetclient.c: generic network RPC client * - * Copyright (C) 2006-2011 Red Hat, Inc. + * Copyright (C) 2006-2012 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -651,7 +651,7 @@ int virNetClientSetTLSSession(virNetClientPtr client, repoll: ret = poll(fds, ARRAY_CARDINALITY(fds), -1); - if (ret < 0 && errno == EAGAIN) + if (ret < 0 && (errno == EAGAIN || errno == EINTR)) goto repoll; ignore_value(pthread_sigmask(SIG_BLOCK, &oldmask, NULL)); @@ -675,7 +675,7 @@ int virNetClientSetTLSSession(virNetClientPtr client, repoll2: ret = poll(fds, ARRAY_CARDINALITY(fds), -1); - if (ret < 0 && errno == EAGAIN) + if (ret < 0 && (errno == EAGAIN || errno == EINTR)) goto repoll2; ignore_value(pthread_sigmask(SIG_BLOCK, &oldmask, NULL)); @@ -1374,7 +1374,7 @@ static int virNetClientIOEventLoop(virNetClientPtr client, repoll: ret = poll(fds, ARRAY_CARDINALITY(fds), timeout); - if (ret < 0 && errno == EAGAIN) + if (ret < 0 && (errno == EAGAIN || errno == EINTR)) goto repoll; ignore_value(pthread_sigmask(SIG_SETMASK, &oldmask, NULL)); diff --git a/src/util/event_poll.c b/src/util/event_poll.c index 1bc1d41329..0e7d1c119c 100644 --- a/src/util/event_poll.c +++ b/src/util/event_poll.c @@ -1,7 +1,7 @@ /* * event.c: event loop for monitoring file handles * - * Copyright (C) 2007, 2010-2011 Red Hat, Inc. + * Copyright (C) 2007, 2010-2012 Red Hat, Inc. * Copyright (C) 2007 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -615,7 +615,7 @@ int virEventPollRunOnce(void) { ret = poll(fds, nfds, timeout); if (ret < 0) { EVENT_DEBUG("Poll got error event %d", errno); - if (errno == EINTR) { + if (errno == EINTR || errno == EAGAIN) { goto retry; } virReportSystemError(errno, "%s",