mirror of
https://github.com/containers/youki
synced 2024-11-23 17:32:15 +01:00
Remove the is_exec_builder as it is redundant, replace with !init
This commit is contained in:
parent
aa5d9c3c9b
commit
4f2e27d588
@ -38,8 +38,6 @@ pub(super) struct ContainerBuilderImpl<'a> {
|
||||
pub container: Option<Container>,
|
||||
/// File descriptos preserved/passed to the container init process.
|
||||
pub preserve_fds: i32,
|
||||
/// Denotes if the builder is for the exec call or not
|
||||
pub is_exec_builder: bool,
|
||||
}
|
||||
|
||||
impl<'a> ContainerBuilderImpl<'a> {
|
||||
@ -124,10 +122,8 @@ impl<'a> ContainerBuilderImpl<'a> {
|
||||
cgroup_manager: cmanager,
|
||||
};
|
||||
|
||||
let (intermediate, init_pid) = process::container_main_process::container_main_process(
|
||||
&container_args,
|
||||
self.is_exec_builder,
|
||||
)?;
|
||||
let (intermediate, init_pid) =
|
||||
process::container_main_process::container_main_process(&container_args, !self.init)?;
|
||||
|
||||
// if file to write the pid to is specified, write pid of the child
|
||||
if let Some(pid_file) = &self.pid_file {
|
||||
|
@ -87,7 +87,6 @@ impl<'a> InitContainerBuilder<'a> {
|
||||
notify_path,
|
||||
container: Some(container.clone()),
|
||||
preserve_fds: self.base.preserve_fds,
|
||||
is_exec_builder: false,
|
||||
};
|
||||
|
||||
builder_impl.create()?;
|
||||
|
@ -129,7 +129,6 @@ impl<'a> TenantContainerBuilder<'a> {
|
||||
notify_path: notify_path.clone(),
|
||||
container: None,
|
||||
preserve_fds: self.base.preserve_fds,
|
||||
is_exec_builder: true,
|
||||
};
|
||||
|
||||
let pid = builder_impl.create()?;
|
||||
|
Loading…
Reference in New Issue
Block a user