Merge pull request #1459 from mxpv/pid

agent: Agent invokes OCI hooks with wrong PID
This commit is contained in:
Eric Ernst 2021-02-24 20:08:56 -08:00 committed by GitHub
commit 2f591f5642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -834,8 +834,6 @@ impl BaseContainer for LinuxContainer {
}
let linux = spec.linux.as_ref().unwrap();
let st = self.oci_state()?;
let (pfd_log, cfd_log) = unistd::pipe().context("failed to create pipe")?;
let _ = fcntl::fcntl(pfd_log, FcntlArg::F_SETFD(FdFlag::FD_CLOEXEC))
@ -938,6 +936,8 @@ impl BaseContainer for LinuxContainer {
info!(logger, "child pid: {}", p.pid);
let st = self.oci_state()?;
join_namespaces(
&logger,
&spec,