feat(supervisor): RealChild + spawn_with_logs
Append RealChild (real tokio::process::Child wrapper) and spawn_with_logs to child.rs. Uses nix::unistd::setpgid via tokio's re-exported pre_exec to create an own process group, and fires per-stream log pump tasks that drain stdout/stderr into the provided LogSink. terminate/kill signal the whole process group via kill(-pgid, SIG*). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ pub mod policy;
|
||||
pub mod retry_window;
|
||||
|
||||
pub use backoff::Backoff;
|
||||
pub use child::{ChildHandle, MockChild, MockChildController};
|
||||
pub use child::{ChildHandle, MockChild, MockChildController, RealChild, spawn_with_logs};
|
||||
pub use logs::{LogSink, RecordedLine, RingBuffer, RotatingLogWriter};
|
||||
pub use policy::{RestartDecision, decide};
|
||||
pub use retry_window::RetryWindow;
|
||||
|
||||
Reference in New Issue
Block a user