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

Implement timeouts for exec command runners #201

Closed
sparrc opened this issue May 18, 2016 · 1 comment
Closed

Implement timeouts for exec command runners #201

sparrc opened this issue May 18, 2016 · 1 comment

Comments

@sparrc
Copy link
Contributor

sparrc commented May 18, 2016

Currently gopsutil has a few places where OS commands are run using the exec library.

Any one of these commands could hang, causing the gopsutil call to hang. While the hang is an OS problem, gopsutil should be able to see it and return an error.

Unfortunately the exec library doesn't have any built-in support for timeouts, but these can be implemented relatively easily using timers (see https://github.com/influxdata/telegraf/blob/master/internal/internal.go#L153).

I likely won't have time to work on this for a while, but I wanted to put the feature request out there, and I will try to find some time for this soon if I can.

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