diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-01-01 09:51:12 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-01-01 09:51:12 (GMT) |
commit | 14e73b186414d6e67cad9924ad72fab1a7d70861 (patch) | |
tree | 4989e166bf359950f0f0d3960175e241840aeadf /Lib/pty.py | |
parent | 33fb554a135720783efb18bb3b3ae382e03ea0d4 (diff) | |
download | cpython-14e73b186414d6e67cad9924ad72fab1a7d70861.zip cpython-14e73b186414d6e67cad9924ad72fab1a7d70861.tar.gz cpython-14e73b186414d6e67cad9924ad72fab1a7d70861.tar.bz2 |
Expose I_ constants. Auto-detect stropts.h. Properly configure the slave terminal.
Diffstat (limited to 'Lib/pty.py')
-rw-r--r-- | Lib/pty.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -86,7 +86,17 @@ def slave_open(tty_name): opened filedescriptor. Deprecated, use openpty() instead.""" - return os.open(tty_name, os.O_RDWR) + result = os.open(tty_name, os.O_RDWR) + try: + from fcntl import ioctl, I_PUSH + except ImportError: + return result + try: + ioctl(result, I_PUSH, "ptem") + ioctl(result, I_PUSH, "ldterm") + except IOError: + pass + return result def fork(): """fork() -> (pid, master_fd) |