executor/linux: comment this bizarre code

This commit is contained in:
Michael Schurter 2019-04-02 11:25:45 -07:00
parent 1d569a27dc
commit 47bed4316f
1 changed files with 4 additions and 1 deletions

View File

@ -163,7 +163,10 @@ func (l *LibcontainerExecutor) Launch(command *ExecCommand) (*ProcessState, erro
}
// Turn relative-to-chroot path into absolute path to avoid
// libcontainer trying to resolve the binary using $PATH
// libcontainer trying to resolve the binary using $PATH.
// Do *not* use filepath.Join as it will translate ".."s returned by
// filepath.Rel. Prepending "/" will cause the path to be rooted in the
// chroot which is the desired behavior.
path = "/" + rel
combined := append([]string{path}, command.Args...)