pub struct LimitedProcessOutput {
pub output: Output,
pub completeness: OutputCompleteness,
}Expand description
Wait for a child process with output-size and time limits.
Kills the process if either limit is exceeded, returning what was
captured so far. Prevents unbounded memory growth on commands that
produce massive output (e.g. rg -i "pattern" over a large tree).
kill_group (Unix): the child was spawned into its own process group
(process_group(0)), so a timeout kill signals the whole group. Killing
only the direct child (a shell) leaves orphaned grandchildren holding the
stdout/stderr pipe write ends — the reader threads then never see EOF and
the join below blocks forever, wedging the caller despite the timeout
having fired (GH #720: an orphaned rg kept a Cursor shell session dead
for hours).
Fields§
§output: Output§completeness: OutputCompletenessAuto Trait Implementations§
impl Forget for LimitedProcessOutput
impl Freeze for LimitedProcessOutput
impl Move for LimitedProcessOutput
impl RefUnwindSafe for LimitedProcessOutput
impl Send for LimitedProcessOutputwhere
RawVecInner: Send,
impl Sync for LimitedProcessOutputwhere
RawVecInner: Sync,
impl Unpin for LimitedProcessOutput
impl UnsafeUnpin for LimitedProcessOutput
impl UnwindSafe for LimitedProcessOutputwhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more