Skip to content

Commit

Permalink
Add a comment explaining when the validate step runs.
Browse files Browse the repository at this point in the history
Signed-off-by: yihuaf <[email protected]>
  • Loading branch information
yihuaf committed Aug 20, 2023
1 parent 4867118 commit ad5ef2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/libcontainer/src/workload/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ pub trait Executor: CloneBoxExecutor {
/// Executes the workload
fn exec(&self, spec: &Spec) -> Result<(), ExecutorError>;

/// Validate if the spec can be executed by the executor. This step runs
/// after the container init process is created, entered into the correct
/// namespace and cgroups, and pivot_root into the rootfs. But this step
/// runs before waiting for the container start signal.
fn validate(&self, spec: &Spec) -> Result<(), ExecutorError>;
}

Expand Down

0 comments on commit ad5ef2c

Please sign in to comment.