bpo-41818: Add os.login_tty() for *nix.#29658
Conversation
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
|
@asvetlov @gpshead I closed #23740 and created this because that one had several merge conflicts and unnecessary new content in Edit: a gentle request for core review; no rush :) |
Sorry, something went wrong.
|
I have resolved the conflicts for you. You have to pull the changes to your computer, regenerate the clinic and configure scripts and then commit the changes. You also need to re-add |
Sorry, something went wrong.
|
@tiran Thank you so much for your help. I will look into this very soon. Edit: I have made the changes :) |
Sorry, something went wrong.
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
MaxwellDupre
left a comment
There was a problem hiding this comment.
413 tests OK.
19 tests skipped:
Tests result: SUCCESS
Also test_pty
Sorry, something went wrong.
MaxwellDupre
left a comment
There was a problem hiding this comment.
Looks ok
Sorry, something went wrong.
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
|
@gpshead I have made the requested changes; please review again. You can ignore the other comments that I made. The following are the answers to your questions/requests; sorry for the slightly long response; I just wanted to provide you with all the information that I gathered. QUESTION1: aren't there potentially some successful dup2 calls to clean up from in this error case? QUESTION2: add a comment as to why this is opened to check for an error and immediately closed.
the bold part if a session leader has no controlling terminal is why the glibc implementation first attempts to |
Sorry, something went wrong.
|
Thanks for making the requested changes! @gpshead: please review the changes made to this pull request. |
Sorry, something went wrong.
gpshead
left a comment
There was a problem hiding this comment.
It needs another merge and clinic output regeneration. otherwise this is good.
Sorry, something went wrong.
|
@gpshead Thank you for the clinic output regeneration :) |
Sorry, something went wrong.
This follows #23536. Also, see #23546, #23686.
os.login_tty()calls the nativelogin_tty()when it is available; otherwise, ifsetsid()is available and ifTIOCSCTTYorttyname()are available, it runs generic code to emulatelogin_tty().Post #23686, #23546, #23740 goals:
test_winsize()to "Lib/test/test_pty.py";Signed-off-by: Soumendra Ganguly soumendraganguly@gmail.com
https://bugs.python.org/issue41818