pub(super) struct ExecTeardown {
stdio: (Receiver<Message>, Receiver<Message>),
attach: SharedContainerAttach,
token: CancellationToken,
process: Arc<Process>,
pub(super) kill: Arc<AtomicBool>,
_stop_output: StopOutput,
}Expand description
Ends an exec session however it ends, also if the client went away and
the loop got aborted, or before the process even got started. The loop
ends before the exit of the process if the connection is gone, if the
client sent a message which is too large, or if the session hit the idle
timeout or lost the exit. Only the last two kill the process, see
ExecTeardown::kill, the others close its stdin or hang up its
terminal. All but the hang-up stop the output, which nothing takes
anymore.
Fields§
§stdio: (Receiver<Message>, Receiver<Message>)The stdout and stderr channels of the process.
attach: SharedContainerAttach§token: CancellationTokenCancelled once the process exited.
process: Arc<Process>The process, which its watcher may reap before the token got cancelled, so it does not get signalled by its PID.
kill: Arc<AtomicBool>Set once the session ended with the idle timeout or lost the exit, which kills the process, like the reaper kills one after its timeout. Without a session the process would run on with nothing waiting for it. Otherwise it gets the end of its stdin and its output pipes closed, or the hang-up of its terminal, like a process started by the client itself once the client went away.
_stop_output: StopOutputStops the read loops once the session took the output, after the exit, dropped after the rest.
Implementations§
Source§impl ExecTeardown
impl ExecTeardown
Sourcefn hang_up(&self)
fn hang_up(&self)
Hang up the terminal like a closed connection does: signal the process
group and the process. Only while the process was not reaped yet, its
group may be gone and taken by another one otherwise, see
Process::signal_group.
Trait Implementations§
Source§impl Drop for ExecTeardown
impl Drop for ExecTeardown
Auto Trait Implementations§
impl Freeze for ExecTeardown
impl RefUnwindSafe for ExecTeardown
impl Send for ExecTeardown
impl Sync for ExecTeardown
impl Unpin for ExecTeardown
impl UnsafeUnpin for ExecTeardown
impl UnwindSafe for ExecTeardown
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].