[issue21772] platform.uname() not EINTR safe

Marc-Andre Lemburg report at bugs.python.org
Tue Jun 17 11:18:50 CEST 2014


Marc-Andre Lemburg added the comment:

I'm not sure whether using os.fsencoding() is a good idea. The encoding used by uname is not defined anywhere and it's possible that Python using a wrong encoding may cause the call to fail (e.g. in case the host name includes non-ASCII chars).

Then again: _syscmd_uname() is currently only used to determine the processor, which will most likely always be ASCII.

BTW: It would be good to replace all other calls to os.popen() by subprocess as well. platform.py in Python 3 no longer has the requirement to stay compatible with earlier Python 2 releases.

----------

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


More information about the Python-bugs-list mailing list