#include <string.h>
#include <signal.h>
#include <time.h>
+#include <locale.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/ipc.h>
static volatile int startup_sem;
static volatile int fio_abort;
+static int exit_value;
struct io_log *agg_io_log[2];
td_set_runstate(td, TD_RUNNING);
- while (td->this_io_bytes[td->ddir] < td->io_size) {
+ while ((td->this_io_bytes[0] + td->this_io_bytes[1]) < td->io_size) {
struct timespec *timeout;
int min_evts = 0;
struct io_u *io_u;
io_u->xfer_buf += ret;
goto requeue;
} else {
- td_verror(td, io_u->error);
put_io_u(td, io_u);
break;
}
continue;
}
+ if (td->error)
+ exit_value++;
+
td_set_runstate(td, TD_REAPED);
if (td->use_thread) {
{
long ps;
+ /*
+ * We need locale for number printing, if it isn't set then just
+ * go with the US format.
+ */
+ if (!getenv("LC_NUMERIC"))
+ setlocale(LC_NUMERIC, "en_US");
+
if (parse_options(argc, argv))
return 1;
}
}
- return 0;
+ return exit_value;
}