GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — GH-142591: Tachyon does not handle non-existent file/module by savannahostrowski · Pull Request #142592 · python/cpython Conversation
|
|
Hmm, there's a better fix here. Please hold :D |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| """Handle live mode for an existing process.""" | ||
| # Check if process exists | ||
| try: | ||
| os.kill(pid, 0) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this works on windows. On Windows, os.kill() only supports signals SIGTERM, CTRL_C_EVENT, and CTRL_BREAK_EVENT. Signal 0 (which is the Unix idiom for checking if a process exists without sending a signal) is not supported on Windows.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This also has a TOCTOU problem: the process may die after you check and before we attach
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The fix probably needs to be done more on the line of https://github.com/python/cpython/pull/142655/changes (we should handle this there)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I've made some improvements to the implementation.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
fe664f9 to
980b035
Compare
980b035 to
24086c8
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks a lot for the PR @savannahostrowski ❤️
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.