[issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long)

STINNER Victor report at bugs.python.org
Sun Nov 18 01:12:16 CET 2012


STINNER Victor added the comment:

> On some OSes and combination of 64bit typess and 32bit long
> it's an invalid assumption.

Can you give an example of OS where pid_t, gid_t or uid_t type are longer than the long type?

(If I remember correctly, the "identifier" of a Windows process is an addresse, so it has a size of sizeof(void*), whereas long can be smaller on 64 bit Windows. But this issue looks to be specific to UNIX.)

----------

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


More information about the Python-bugs-list mailing list