[issue10812] Add some posix functions

Ross Lagerwall report at bugs.python.org
Fri Jan 7 10:19:19 CET 2011


Ross Lagerwall <rosslagerwall at gmail.com> added the comment:

>  it's a bit asymmetric that gethostname is in the socket
>  module and supports Windows, and sethostname is in the POSIX
>  module. It would be useful to have a gethostname in the POSIX
>  module also which is a) POSIX only and b) supports embedded
>  NUL bytes.

According to the spec for gethostname(), the hostname that it returns is null-terminated so it won't support embedded NUL bytes. Should we still add it anyway?

----------

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


More information about the Python-bugs-list mailing list