diff options
author | Stef Walter <stef@thewalter.net> | 2013-06-17 14:45:36 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-06-17 14:45:36 +0200 |
commit | e32481727387460d5900d0bbb495d3694facf64b (patch) | |
tree | fec69fcc09e324105240fffaa73f60dc1eec4b80 /tools | |
parent | b6e065cda1db37a6c8ed52dac3432468e1277323 (diff) |
tools: Fix passing args to external commands
There were various bugs passing arguments, with duplicates being
passed, as well as certain arguments being skipped.t
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/tool.c b/tools/tool.c index dcbb1a5..313484a 100644 --- a/tools/tool.c +++ b/tools/tool.c @@ -204,6 +204,8 @@ exec_external (const char *command, return_if_fail (path != NULL); argv[0] = filename; + argv[argc] = NULL; + execvp (path, argv); } @@ -245,6 +247,8 @@ main (int argc, char *argv[]) if (!command) { skip = true; command = argv[in]; + } else { + skip = false; } /* The global long options */ |