[issue15898] OSX TTY bug

Ned Deily report at bugs.python.org
Mon Sep 10 04:25:45 CEST 2012


Ned Deily added the comment:

I have not been able to reproduce the behavior you report using various Pythons on OS X 10.8 or on OS X 10.5.  Can you give more specifics on the environment that fails for you?

I certainly don't claim to have any experience with these tty/pty modules or with the underlying system calls and I'm not sure what you are trying to do here but isn't it a bit risky to be calling tty.tcsetattr() from both the parent and child processes simultaneously, since the call is after the fork?  tcsetattr is dealing with a job-wide data structure and, under the covers, the tcsetattr() function currently reads and writes various field non-atomically.  What happens if you move the tcgetattr and tcsetattr to before the os.fork call or into the parent-only code after the "else"?

http://hg.python.org/cpython/file/default/Modules/termios.c

----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15898>
_______________________________________


More information about the Python-bugs-list mailing list