We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, the preexec_fn is executed after the file descriptors are closed. This has some unwanted effects:
preexec_fn
The proposal is to move the "close the fds" section below the "execute the preexec_fn" code: https://github.com/pexpect/ptyprocess/blob/master/ptyprocess/ptyprocess.py#L266-L285
For reference, this is what it does subprocess.Popen: https://github.com/python/cpython/blob/master/Modules/_posixsubprocess.c#L528-L549
subprocess.Popen
If it is okay, I can do a PR with the fix but I would like to hear your opinions about this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, the
preexec_fn
is executed after the file descriptors are closed. This has some unwanted effects:preexec_fn
opens a file descriptor, it will be inherit by the child processpreexec_fn
relays on having some file descriptor open, it will crash (see Please allow calling preexec_fn before closing file descriptors, not after. pexpect#368)The proposal is to move the "close the fds" section below the "execute the preexec_fn" code: https://github.com/pexpect/ptyprocess/blob/master/ptyprocess/ptyprocess.py#L266-L285
For reference, this is what it does
subprocess.Popen
: https://github.com/python/cpython/blob/master/Modules/_posixsubprocess.c#L528-L549If it is okay, I can do a PR with the fix but I would like to hear your opinions about this.
The text was updated successfully, but these errors were encountered: