mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-41818: Add os.login_tty() for *nix. (#29658)
* Add `os.login_tty(fd)` for Unix. Reviewed-by: Christian Heimes <christian@python.org> Signed-off-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
This commit is contained in:
parent
42fee931d0
commit
ae553b3561
7 changed files with 184 additions and 14 deletions
|
@ -1000,6 +1000,17 @@ as internal buffering of data.
|
|||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. function:: login_tty(fd)
|
||||
|
||||
Prepare the tty of which fd is a file descriptor for a new login session.
|
||||
Make the calling process a session leader; make the tty the controlling tty,
|
||||
the stdin, the stdout, and the stderr of the calling process; close fd.
|
||||
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
|
||||
.. function:: lseek(fd, pos, how)
|
||||
|
||||
Set the current position of file descriptor *fd* to position *pos*, modified
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue