summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-29 13:39:14 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-29 13:39:14 -0600
commit8c302eb9706963e07d6d79998e15bede77b94520 (patch)
tree67009ebc5d7c44ac8e7897be1b85435f89998c59
parent8fa69ffaa2f6a9432fbc81b01017d0d5a364b21e (diff)
parent321d0c079230cbd447a8456db24ecd7eb2fd1be4 (diff)
downloadfio-8c302eb9706963e07d6d79998e15bede77b94520.tar.gz
fio-8c302eb9706963e07d6d79998e15bede77b94520.tar.bz2
Merge branch 'patch-1' of https://github.com/hannesweisbach/fio
* 'patch-1' of https://github.com/hannesweisbach/fio: Fix output redirection of exec_prerun/_postrun
-rw-r--r--backend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend.c b/backend.c
index cb15b0e6..1c339408 100644
--- 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);