-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
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 :) |
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 |
@tiran Thank you so much for your help. I will look into this very soon. Edit: I have made the changes :) |
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>
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.
413 tests OK.
19 tests skipped:
Tests result: SUCCESS
Also test_pty
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.
Looks ok
@MaxwellDupre Thank you for the review. |
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 |
Thanks for making the requested changes! @gpshead: please review the changes made to this pull request. |
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.
It needs another merge and clinic output regeneration. otherwise this is good.
@gpshead Thank you for the clinic output regeneration :) |
@gpshead Thank you for the merge. |
This follows #23536. Also, see #23546, #23686.
os.login_tty()
calls the nativelogin_tty()
when it is available; otherwise, ifsetsid()
is available and ifTIOCSCTTY
orttyname()
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