execvp does not require specifying the full path to the executable (e.g., "ls" instead of "/bin/ls"), making the operation of 'lxc-attach' consistent with 'lxc-start' and 'lxc-execute'.
Signed-off-by: David Ward <david.w...@ll.mit.edu> --- src/lxc/lxc_attach.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_attach.c b/src/lxc/lxc_attach.c index 3571b09..4883327 100644 --- a/src/lxc/lxc_attach.c +++ b/src/lxc/lxc_attach.c @@ -89,7 +89,7 @@ Options :\n\ .checker = NULL, }; -int main(int argc, char *argv[], char *envp[]) +int main(int argc, char *argv[]) { int ret; pid_t pid, init_pid; @@ -212,7 +212,7 @@ int main(int argc, char *argv[], char *envp[]) lxc_sync_fini(handler); if (my_args.argc) { - execve(my_args.argv[0], my_args.argv, envp); + execvp(my_args.argv[0], my_args.argv); SYSERROR("failed to exec '%s'", my_args.argv[0]); return -1; } @@ -232,7 +232,7 @@ int main(int argc, char *argv[], char *envp[]) NULL, }; - execve(args[0], args, envp); + execvp(args[0], args); SYSERROR("failed to exec '%s'", args[0]); return -1; } -- 1.7.4.1 ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel