From a55bbddcf1af1ed67efb1e7850f2bc3d57bcfe43 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Thu, 12 Jun 2025 00:31:00 -0600 Subject: [PATCH] fix: expose TokioChildWrapper::id() in TokioChildProcess and TokioChildProcessOut (#254) --- crates/rmcp/src/transport/child_process.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/rmcp/src/transport/child_process.rs b/crates/rmcp/src/transport/child_process.rs index 7295779..af909ec 100644 --- a/crates/rmcp/src/transport/child_process.rs +++ b/crates/rmcp/src/transport/child_process.rs @@ -48,6 +48,13 @@ pin_project_lite::pin_project! { } } +impl TokioChildProcessOut { + /// Get the process ID of the child process. + pub fn id(&self) -> Option { + self.child.inner.id() + } +} + impl AsyncRead for TokioChildProcessOut { fn poll_read( self: std::pin::Pin<&mut Self>, @@ -77,6 +84,11 @@ impl TokioChildProcess { }) } + /// Get the process ID of the child process. + pub fn id(&self) -> Option { + self.child.inner.id() + } + pub fn split(self) -> (TokioChildProcessOut, ChildStdin) { let TokioChildProcess { child,