Tweak daemon event debug to include errno

* daemon/event.c: Include errno in debug info upon poll() failure
This commit is contained in:
Daniel P. Berrange 2010-12-01 16:41:14 +00:00
parent c846bc9eb8
commit 19240c3c00
1 changed files with 2 additions and 1 deletions

View File

@ -576,13 +576,14 @@ int virEventRunOnce(void) {
retry:
EVENT_DEBUG("Poll on %d handles %p timeout %d", nfds, fds, timeout);
ret = poll(fds, nfds, timeout);
EVENT_DEBUG("Poll got %d event", ret);
if (ret < 0) {
EVENT_DEBUG("Poll got error event %d", errno);
if (errno == EINTR) {
goto retry;
}
goto error_unlocked;
}
EVENT_DEBUG("Poll got %d event(s)", ret);
virMutexLock(&eventLoop.lock);
if (virEventDispatchTimeouts() < 0)