Skip to content

Support timeout in Popen.communicate #1724

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

Merged
merged 1 commit into from
Feb 1, 2020

Conversation

palaviv
Copy link
Contributor

@palaviv palaviv commented Jan 31, 2020

The new version of rust-subprocess supports timeout hniksic/rust-subprocess#30

@palaviv palaviv force-pushed the subprocess-timeout branch from 796d38f to 9c12b95 Compare February 1, 2020 07:54
@palaviv palaviv merged commit 17fdc19 into RustPython:master Feb 1, 2020
@hniksic
Copy link

hniksic commented Feb 2, 2020

if let OptionalArg::Present(timeout) = args.timeout {
            communicator = communicator.limit_time(Duration::new(timeout, 0));

@palaviv I'm not acquainted with RustPython, but I think this could easily support fractional-second timeouts by retrieving the timeout as an f64 and constructing the duration using from_secs_f64.

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

Successfully merging this pull request may close these issues.

3 participants