From: Erwan Velu Date: Wed, 17 Jul 2013 20:29:27 +0000 (+0200) Subject: backend: Get rid of sh -c for exec_string X-Git-Tag: fio-2.1.2~48 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=8d271b66d2bc1025f760d3c5a976dac42262a178 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. --- 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)