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

On windows, send sigkill to process if it exceeds its alloted time #79

Merged
merged 2 commits into from
Dec 18, 2014

Conversation

jaym
Copy link
Contributor

@jaym jaym commented Dec 17, 2014

Timeouts did not work correctly on windows because we do not kill or
abandon the process.

What was happening was a timeout condition was getting correctly detected,
and an exception was being raised. However, before the exception could
propagate, whatever the process was writing was fully read until it closed its FD.

@randomcamel said he was fixing up the tests

cc @btm @adamedx @randomcamel @opscode/client-engineers

@randomcamel
Copy link

I haven't had any luck with the tests, but I'm 👍 on this change.

Can you add a spec so we don't regress?

@tyler-ball
Copy link
Contributor

Yeah spec and 👍

@danielsdeleo
Copy link
Contributor

Code looks sane, would like a regression test. What we do for *nix is create a process that sleeps for a very long time (like 100s or more) and then set the timeout very low, like 1s, then check if the process exists after rescuing the timeout error.

@lamont-granquist
Copy link
Contributor

There's also some associated bugs in the chef repo about windows timeouts being ignored which can be closed after this is merged.

@randomcamel
Copy link

chef/chef#2175

Timeouts did not work correctly on windows because we do not kill or
abandon the process.

What was happening was a timeout condition was getting correctly detected,
and an exception was being raised. However, before the exception could
propogate, whatever the process was writing was fully read until it closed its FD.
@jaym jaym force-pushed the jdm/win-kill-proc branch 2 times, most recently from 2fc9d56 to ffec9cd Compare December 18, 2014 20:19
@jaym
Copy link
Contributor Author

jaym commented Dec 18, 2014

@tyler-ball @randomcamel @danielsdeleo Added a test
I could not reuse the unix one as it used arrays for the command, and that does not seem be supported with the windows implementation

@danielsdeleo
Copy link
Contributor

👍 :shipit:

jaym added a commit that referenced this pull request Dec 18, 2014
On windows, send sigkill to process if it exceeds its alloted time
@jaym jaym merged commit b4eb247 into master Dec 18, 2014
@jaym jaym deleted the jdm/win-kill-proc branch December 18, 2014 21:13
jaym added a commit that referenced this pull request Dec 19, 2014
On windows, send sigkill to process if it exceeds its alloted time
@jaym jaym mentioned this pull request Feb 6, 2015
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants