+static int fio_netio_accept(struct thread_data *td, struct fio_file *f)
+{
+ struct netio_data *nd = td->io_ops->data;
+ socklen_t socklen = sizeof(nd->addr);
+ struct pollfd pfd;
+ int ret;
+
+ log_info("fio: waiting for connection\n");
+
+ /*
+ * Accept loop. poll for incoming events, accept them. Repeat until we
+ * have all connections.
+ */
+ while (!td->terminate) {
+ pfd.fd = nd->listenfd;
+ pfd.events = POLLIN;
+
+ ret = poll(&pfd, 1, -1);
+ if (ret < 0) {
+ if (errno == EINTR)
+ continue;
+
+ td_verror(td, errno, "poll");
+ break;
+ } else if (!ret)
+ continue;