Ata E Husain Bohra <ata.husain@hotmail.com>
Ján Tomko <jtomko@redhat.com>
Richa Marwaha <rmarwah@linux.vnet.ibm.com>
+ Peter Feiner <peter@gridcentric.ca>
[....send patches to get your name here....]
/*
* 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
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));
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));
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));
/*
* 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
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",