-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add Process Creation Flags. #52
base: master
Are you sure you want to change the base?
Conversation
@hniksic can you please take a look? Not having this makes use cases of |
@@ -110,6 +110,8 @@ pub struct PopenConfig { | |||
pub stderr: Redirection, | |||
/// Whether the `Popen` instance is initially detached. | |||
pub detached: bool, | |||
/// Process Creation Flags | |||
pub creation_flags: u32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be behind #[cfg(windows)]
.
Do I understand correctly, there is no way to suppress showing console window of a child process for a non-console application on Windows without merging this in? |
Update from master
Hi! As far as I know -- yes. When I was making this pull request I was just getting into Rust, thus I've tried finding and using libraries like this one (having familiar interface was very important for me). As of now, I do recommend using either standard Command or async one from tokio. This library probably won't break you free from building some interface on top of it (for example, task, thread, channel, etc), so the amount of code you write won't change that much by using std or tokio (as this library mimics python library interface, making it not that far from standard Command interface). If you really do need this library, you can just use my fork, I've made it up to date with master (or apply the changes you need by yourself). Good luck! |
Adds the ability to set the process creation flags for Windows process via param in the PopenConfig struct.
This is a workaround for #40, so you can, for example, pass flag 0x08000000, which hides the CMD on Windows, or any other flag you want.