Merge branch 'patch-1' of https://github.com/hannesweisbach/fio
[fio.git] / backend.c
index cb15b0e626ea1264f39f16532dfde454706248eb..1c339408fa5fd0338cdd0e98444b5a7a2fa509a8 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1469,12 +1469,12 @@ static bool keep_running(struct thread_data *td)
 
 static int exec_string(struct thread_options *o, const char *string, const char *mode)
 {
-       size_t newlen = strlen(string) + strlen(o->name) + strlen(mode) + 9 + 1;
+       size_t newlen = strlen(string) + strlen(o->name) + strlen(mode) + 13 + 1;
        int ret;
        char *str;
 
        str = malloc(newlen);
-       sprintf(str, "%s &> %s.%s.txt", string, o->name, mode);
+       sprintf(str, "%s > %s.%s.txt 2>&1", string, o->name, mode);
 
        log_info("%s : Saving output of %s in %s.%s.txt\n",o->name, mode, o->name, mode);
        ret = system(str);