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
Work around lack of os.kill in win32. #2204
Conversation
Fixes iptest brokenness caused by ipython#2148.
Great, thanks for pitching in so fast. I got busy this morning with other things and was just going to start actually coding this... |
except (OSError, NotImplementedError): | ||
print('Cleaning stale PID: %d' % subp.pid) | ||
subp.kill() | ||
except: # (OSError, WindowsError) ? |
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.
Maybe print a message here with just the exception in case a stale process fails to clean up? That way the user may know there's something worth looking at manually.
The logic looks clean to me, I just have one small suggestion about improving feedback at the end. @minrk, do you have a windows VM to test this one on? Sorry again for the mixup! |
I added a warning message if the process could not be killed (i.e. |
Testing in a VM now... |
BTW, I may soon get a box where we can set up a permanent windows VM for CI and remote access by all of us. I'll ping the list when/if it happens. |
Test results for commit 8f4c54b merged into master
Not available for testing: python2.6 |
Works fine on my Win7 VM. Thanks, @bfroehle! |
OK, merging this to undo my bad karma score for the day. Thanks everyone. I'll eat my hat tonight :) |
For the record, works on WinXP with Python 2.7. |
Great, thanks for that check @jdmarch! Good to know we're back in win32's good graces :) |
Work around lack of os.kill in win32. Fixes iptest brokenness on win32 caused by my having merged ipython#2148 too hastily. Extra credit to @bfroehle and @minrk for working/testing the fix quickly.
Fixes iptest brokenness caused by #2148.