From 1c1a73c5bc93c3d351105dbbc0a6e81a1d6d72dd Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Wed, 11 Jun 2025 19:07:14 -0600 Subject: [PATCH] fix: expose TokioChildWrapper::id() in TokioChildProcess and TokioChildProcessOut --- 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 729577973..af909ecd3 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,