Skip to content

Commit 93b5dd2

Browse files
feat: add &mut Command to post_spawn() (#24)
Co-authored-by: Félix Saparelli <[email protected]>
1 parent bcfd7fd commit 93b5dd2

File tree

4 files changed

+325
-4
lines changed

4 files changed

+325
-4
lines changed

Cargo.lock

Lines changed: 39 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ windows = { version = "0.61.1", optional = true }
3636

3737
[dev-dependencies]
3838
remoteprocess = "0.5.0"
39+
tempfile = { version = "3.20.0", default-features = false }
3940
tokio = { version = "1.38.2", features = ["io-util", "macros", "process", "rt", "rt-multi-thread", "time"] }
4041

4142
[features]

src/generic_wrap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ macro_rules! Wrap {
9191
for (id, wrapper) in wrappers.iter_mut() {
9292
#[cfg(feature = "tracing")]
9393
::tracing::debug!(?id, "post_spawn");
94-
wrapper.post_spawn(&mut child, self)?;
94+
wrapper.post_spawn(command, &mut child, self)?;
9595
}
9696

9797
let mut child = Box::new(
@@ -204,7 +204,7 @@ macro_rules! Wrap {
204204
/// how `CreationFlags` on Windows works along with `JobObject`.
205205
///
206206
/// Default: no-op.
207-
fn post_spawn(&mut self, _child: &mut $child, _core: &$name) -> Result<()> {
207+
fn post_spawn(&mut self, _command: &mut $command, _child: &mut $child, _core: &$name) -> Result<()> {
208208
Ok(())
209209
}
210210

0 commit comments

Comments
 (0)