[issue26897] Clarify Popen stdin, stdout, stderr
New submission from Yclept Nemo: From: https://docs.python.org/dev/library/subprocess.html#popen-constructor "..., an existing file descriptor (a positive integer), an existing file object, and None." It should be made clear that the file object must be backed by an operating system file, i.e. must have a valid file descriptor. As it stands, the documentation suggests implicit concurrency: that any file object can be used, and on read/write from the subprocess/OS arbitrary python code will be executed, i.e. the python interpreter is pre-empted or python spawns a hidden I/O thread. Anyway, I'm pretty sure subprocess.Popen() just redirects the forked process' stdout/stdin/stderr to the file descriptors from the provided file object. ---------- assignee: docs@python components: Documentation messages: 264579 nosy: Yclept.Nemo, docs@python priority: normal severity: normal status: open title: Clarify Popen stdin, stdout, stderr versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26897> _______________________________________
Martin Panter added the comment: Yes, in all cases I understand it is just the file descriptor that matters. Perhaps any documentation update could also take Issue 24358 into account, which points out that compressed and buffered file object wrappers also cause inconsistencies in the data at the high-level file object and the OS-level file descriptor. ---------- nosy: +martin.panter stage: -> needs patch versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26897> _______________________________________
participants (2)
-
Martin Panter -
Yclept Nemo