From: R. Steve McKown Date: Sun, 23 Sep 2012 17:55:19 +0000 (-0600) Subject: Execute shell progs with user PATH X-Git-Tag: 0.1~4 X-Git-Url: https://oss.titaniummirror.com/gitweb?p=repo_shell.git;a=commitdiff_plain;h=9f92ff54a7119d649dfb1e3110ea35f63fa00967 Execute shell progs with user PATH --- diff --git a/repo-shell.c b/repo-shell.c index b44c644..8399925 100644 --- a/repo-shell.c +++ b/repo-shell.c @@ -321,7 +321,7 @@ int main(int argc, char **argv) cd_to_homedir(); count = split_cmdline(prog, &user_argv); if (count >= 0) { - execv(user_argv[0], (char *const *) user_argv); + execvp(user_argv[0], (char *const *) user_argv); free(user_argv); die("unrecognized command '%s'", argv[2]); } else {