python / cpython

The Python programming language
https://www.python.org/
Other
60.06k stars 29.09k forks source link

Add support for openpty(3) and forkpty(3), when available. #32459

Closed Yhg1s closed 23 years ago

Yhg1s commented 23 years ago
BPO 400640
Nosy @gvanrossum, @freddrake, @Yhg1s
Files
  • None: None
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = 'https://github.com/freddrake' closed_at = created_at = labels = [] title = 'Add support for openpty(3) and forkpty(3), when available.' updated_at = user = 'https://github.com/Yhg1s' ``` bugs.python.org fields: ```python activity = actor = 'fdrake' assignee = 'fdrake' closed = True closed_date = None closer = None components = ['None'] creation = creator = 'twouters' dependencies = [] files = ['2466'] hgrepos = [] issue_num = 400640 keywords = ['patch'] message_count = 5.0 messages = ['32840', '32841', '32842', '32843', '32844'] nosy_count = 3.0 nosy_names = ['gvanrossum', 'fdrake', 'twouters'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue400640' versions = [] ```

    Yhg1s commented 23 years ago
    freddrake commented 23 years ago

    I've asked Thomas about test cases that exercise this patch.

    freddrake commented 23 years ago

    Checked in; Thomas knows he owes some test cases.

    gvanrossum commented 23 years ago

    I suppose this won't hurt...

    Yhg1s commented 23 years ago

    This patch adds the openpty() and forkpty() library calls to posixmodule.c, when they are available on the target system. (glibc-2.1-based Linux systems, FreeBSD and BSDI at least, probably the other BSD-based systems as well.)

    Lib/pty.py is also rewritten to use openpty when available, but falls back to the old SGI method or the 'manual' BSD open-a-pty code. Openpty() is necessary to use the Unix98 pty's under Linux 2.2, or when using non-standard tty names under (at least) BSDI, which is why I needed it, myself ;-) forkpty() is included for symmetry.

    The next patch includes suggested Doc-changes, but I'm not a TeX-y and haven't tested these additions.

    See http://www.python.org/pipermail/patches/2000-June/000896.html and http://www.python.org/pipermail/patches/2000-June/000962.html for more information.