-
-
Notifications
You must be signed in to change notification settings - Fork 335
Allow timeout for Exec to avoid hanging #225
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
Comments
Great suggestions, @rcowham! There's been some previous discussion on this, if you haven't already seen it: in #207 and #105, for example. Would you like to review those and see if you can propose a concrete example program to demonstrate your idea? Good feature proposals tend to satisfy as many as possible of the following criteria:
|
For my use cases, a timeout on the whole pipeline is sufficient - just want to avoid an indefinite hang. Clearly this can be done by me putting it on a thread, and killing the process if required - but if library can do it...
|
A context would be the more idiomatic way to do this, wouldn't it? |
A context would be fine - wasn't sure from reading other issues if that was the preferred way... |
Just a reminder that this is with you (or whoever wants to work on it) to complete the four steps I outlined. |
It would be nice to be able to specify a timeout to avoid commands hanging during execution.
Maybe something like the existing WithEnv(), but instead WithTimeout() or WithWaitDelay() to support the new (Go 1.20) WaitDelay?
https://pkg.go.dev/os/exec#Cmd.WaitDelay
The text was updated successfully, but these errors were encountered: