Martin Panter added the comment:

If you return null bytes, they will be written to the parent process’s stdout 
file descriptor, rather than being ignored. I do not think it is possible to 
ignore output with the spawn() API, unless perhaps you previously set up stdout 
write to /dev/null or similar.

Do you have a reference for your fact about terminals ignoring null input 
bytes? I’m skeptical because a basic serial terminal can send arbitrary data 
including nulls, but I am not so familiar with pseudo-terminals.

However the bit about interpreting an empty string could be useful. I would 
drop the “or any falsey value”; is that a typo? I suspect that the functions 
have to return byte strings (not text). It would be nice to say what the 
consequences of the EOF condition is, e.g. I can see for the child’s output it 
would stop copying, but not actually close the parent’s stdout to signal EOF. 
What about in the other direction? Can you signal multiple EOFs with data in 
between?

----------
nosy: +martin.panter
stage:  -> patch review
versions:  -Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22865>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to