Commit 755fa453 by Tycho Andersen Committed by Stéphane Graber

don't hardcode the path to criu when checking versions

We use the right path when actually execing criu to checkpoint and restore, but when checking versions we didn't. Let's use the right path. Reported-by: 's avatarDietmar Maurer <dietmar@proxmox.com> Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent a0411275
......@@ -223,13 +223,15 @@ static bool criu_version_ok()
if (pid == 0) {
char *args[] = { "criu", "--version", NULL };
char *path;
close(pipes[0]);
close(STDERR_FILENO);
if (dup2(pipes[1], STDOUT_FILENO) < 0)
exit(1);
execv("/usr/local/sbin/criu", args);
path = on_path("criu", NULL);
execv(path, args);
exit(1);
} else {
FILE *f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment