[New-bugs-announce] [issue36603] should pty.openpty() set pty/tty inheritable?
cagney
report at bugs.python.org
Thu Apr 11 11:17:03 EDT 2019
New submission from cagney <andrew.cagney at gmail.com>:
pty.openpty(), on systems with a working os.openpty() / openpty(3) executes:
if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0)
goto posix_error;
if (_Py_set_inheritable(master_fd, 0, NULL) < 0)
goto error;
if (_Py_set_inheritable(slave_fd, 0, NULL) < 0)
goto error;
where as on systems where this is fails it instead executes:
master_fd, slave_name = _open_terminal()
slave_fd = slave_open(slave_name)
i.e., result = os.open(tty_name, os.O_RDWR)
return master_fd, slave_fd
where os.open() was "Changed in version 3.4: The new file descriptor is now non-inheritable."
(personally I'd deprecate pty.openpty(), but that is just me)
----------
components: IO
messages: 339982
nosy: cagney
priority: normal
severity: normal
status: open
title: should pty.openpty() set pty/tty inheritable?
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36603>
_______________________________________
More information about the New-bugs-announce
mailing list