[issue10812] Add some posix functions
Ross Lagerwall
report at bugs.python.org
Fri Jan 7 20:20:01 CET 2011
Ross Lagerwall <rosslagerwall at gmail.com> added the comment:
Thanks for the comments.
I implemented sethostid() - its not actually in the posix spec, but linux/*bsd
have it although the signature for FreeBSD is a bit different.
I implemented gethostname(). Both get/sethostname() now use FSDefault encoding.
gethostname() is null-terminated so it doesn't have to deal with embedded NULs.
sethostname() works with embedded NULs.
Since id_t can contain a pid_t, I now parse id_t with _Py_PARSE_PID.
waitid() also now returns a structsequence of the correct fields.
According to the spec, gethostid does not set errno - it now checks anyway.
Instead of PARSE_OFF_T, I use a O& parser.
----------
Added file: http://bugs.python.org/file20305/10812_v4.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10812>
_______________________________________
More information about the Python-bugs-list
mailing list