poll: break on EINTR without complaining
[fio.git] / server.c
index d0ff25a31a898b243aa3a043ccc64264929331ee..6ff1033a52bd604ba4836c08d4bb22ab9a9ed47d 100644 (file)
--- a/server.c
+++ b/server.c
@@ -128,6 +128,8 @@ struct fio_net_cmd *fio_net_recv_cmd(int sk)
                do {
                        ret = poll(&pfd, 1, 100);
                        if (ret < 0) {
+                               if (errno == EINTR)
+                                       break;
                                log_err("fio: poll: %s\n", strerror(errno));
                                break;
                        } else if (!ret)
@@ -523,10 +525,10 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)
 
        for (i = 0; i < 3; i++) {
                p.ts.total_io_u[i]      = cpu_to_le64(ts->total_io_u[i]);
-               p.ts.short_io_u[i]      = cpu_to_le64(ts->total_io_u[i]);
+               p.ts.short_io_u[i]      = cpu_to_le64(ts->short_io_u[i]);
        }
 
-       p.ts.total_submit               = cpu_to_le64(ts->total_submit);
+       p.ts.total_submit       = cpu_to_le64(ts->total_submit);
        p.ts.total_complete     = cpu_to_le64(ts->total_complete);
 
        for (i = 0; i < 2; i++) {