From 8d271b66d2bc1025f760d3c5a976dac42262a178 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Wed, 17 Jul 2013 22:29:27 +0200 Subject: [PATCH] backend: Get rid of sh -c for exec_string Running commands in a 'sh -c' does kill the existing environment values. i.e that does kill ssh-agent. It sounds more 'direct' to execute the command in the same environment as fio. --- backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 8d16fe28..c2fa34cc 100644 --- a/backend.c +++ b/backend.c @@ -1088,11 +1088,11 @@ static int keep_running(struct thread_data *td) static int exec_string(const char *string) { - int ret, newlen = strlen(string) + 1 + 8; + int ret, newlen = strlen(string) + 1 + 2; char *str; str = malloc(newlen); - sprintf(str, "sh -c %s", string); + sprintf(str, "%s", string); ret = system(str); if (ret == -1) -- 2.25.1