mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 17:12:14 +00:00
c/r: log the exact command we exec
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
This commit is contained in:
parent
72e7e16809
commit
cf4b07a5af
@ -126,7 +126,7 @@ static void exec_criu(struct criu_opts *opts)
|
|||||||
int netnr = 0;
|
int netnr = 0;
|
||||||
struct lxc_list *it;
|
struct lxc_list *it;
|
||||||
|
|
||||||
char buf[4096], tty_info[32];
|
char buf[4096], *pos, tty_info[32];
|
||||||
|
|
||||||
/* If we are currently in a cgroup /foo/bar, and the container is in a
|
/* If we are currently in a cgroup /foo/bar, and the container is in a
|
||||||
* cgroup /lxc/foo, lxcfs will give us an ENOENT if some task in the
|
* cgroup /lxc/foo, lxcfs will give us an ENOENT if some task in the
|
||||||
@ -356,6 +356,15 @@ static void exec_criu(struct criu_opts *opts)
|
|||||||
|
|
||||||
argv[argc] = NULL;
|
argv[argc] = NULL;
|
||||||
|
|
||||||
|
buf[0] = 0;
|
||||||
|
pos = buf;
|
||||||
|
for (i = 0; argv[i]; i++) {
|
||||||
|
pos = strncat(buf, argv[i], buf + sizeof(buf) - pos);
|
||||||
|
pos = strncat(buf, " ", buf + sizeof(buf) - pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
INFO("execing: %s", buf);
|
||||||
|
|
||||||
#undef DECLARE_ARG
|
#undef DECLARE_ARG
|
||||||
execv(argv[0], argv);
|
execv(argv[0], argv);
|
||||||
err:
|
err:
|
||||||
|
Loading…
Reference in New Issue
Block a user