+ /* Wait for 'client_sock' to become ready before trying again. We
+ * can't use poll_block() because it sometimes calls into vlog, which
+ * calls indirectly into worker_send_iovec(). To be usable here,
+ * poll_block() would therefore need to be reentrant, but it isn't
+ * (calling it recursively causes memory corruption and an eventual
+ * crash). */
+ pfd.fd = client_sock;
+ pfd.events = POLLIN | POLLOUT;
+ do {
+ error = poll(&pfd, 1, -1) < 0 ? errno : 0;
+ } while (error == EINTR);
+ if (error) {
+ worker_broke();
+ VLOG_ABORT("poll failed (%s)", strerror(error));
+ }