Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Exposing child id from inner std::process::Command #219

Open
Simon-Brummer opened this issue Oct 16, 2024 · 1 comment
Open

Comments

@Simon-Brummer
Copy link

Hi,

I have a small feature request: I've tried the use assert_cmd to test if may application reacts correctly to unix signals. In order to do that,
I need to get the PID of the running process to send the right signal. I know that std::process::Command implements a way to do so and it would be nice to have the same functionality in assert_cmd

Cheers Simon

@epage
Copy link
Contributor

epage commented Oct 16, 2024

What parts of assert_cmd::Command are you expecting to take advantage of? assert_cmd is generally geared towards one-shot programs. You could just use std::process::Command to do what you want (calling assert_cmd::cargo::cargo_bin_cmd as needed), deal with the Child as needed, nd then get an Output that you can use OutputAssertExt with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants