diff --git a/.github/workflows/integration_tests_validation.yaml b/.github/workflows/integration_tests_validation.yaml index baa0b9d3d..17b2571b9 100644 --- a/.github/workflows/integration_tests_validation.yaml +++ b/.github/workflows/integration_tests_validation.yaml @@ -5,6 +5,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: changes: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fd27e49c..417b945d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: changes: diff --git a/crates/libcontainer/src/process/container_main_process.rs b/crates/libcontainer/src/process/container_main_process.rs index 245a5b3a3..33a024281 100644 --- a/crates/libcontainer/src/process/container_main_process.rs +++ b/crates/libcontainer/src/process/container_main_process.rs @@ -12,7 +12,6 @@ use nix::unistd::Pid; use crate::seccomp; #[cfg(feature = "libseccomp")] use nix::{ - errno::Errno, sys::socket::{self, UnixAddr}, unistd, }; @@ -117,15 +116,12 @@ pub fn container_main_process(container_args: &ContainerArgs) -> Result { log::warn!("intermediate process killed with signal: {sig}") } Ok(_) => (), - Err(err) => { + Err(nix::errno::Errno::ECHILD) => { // This is safe because intermediate_process and main_process check if the process is // finished by piping instead of exit code. - if err == Errno::ECHILD { - log::warn!("intermediate process already reaped"); - } else { - bail!("failed to wait for intermediate process: {err}"); - } + log::warn!("intermediate process already reaped"); } + Err(err) => bail!("failed to wait for intermediate process: {err}"), }; Ok(init_pid)