add better workaround system for processes when there is no console.#130
Merged
add better workaround system for processes when there is no console.#130
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
This change does a better job at providing a workaround when there is no standard stdin, stdout, stderr inputs by checking if
_fileno(...)is -2 which is the safest way to perform this, It's better than the old method written around 2 days ago for 0.6.1's release. It is related to #126 but I still refuse to do the full subprocess.py implemenation assuming it would make my pull request to uvloop all that much more difficult which I did not see as being an option unless I'm forced to. Using devnull is a much more reliable choice in which it doesn't become of game of juggling file descriptors around and doesn't use a global variable to determine if there isn't a console (which that can be unreliable if these items were changed by the end user or developer).Note
If your wondering as to why I'm refusing to write things the way subprocess.py has the fds open and close when items are None is that I have to merge this code back to the uvloop fork I have anyways which is already a pain to resync these up so if your wondering why I'm do not want to do the full setup. There's your reason.
Are there changes in behavior for the user?
Users should now expect less unusual behaviors with pyinstaller and cxfreeze or other exe builders when attempting to launch a subprocess.
Is it a substantial burden for the maintainers to support this?
Related issue number
Checklist