classification
Title: posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long)
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.2, Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Return from fork() is pid_t, not int
View: 1983
Superseder:
Assigned To: Nosy List: ajaksu2, christian.heimes, pitrou, r.david.murray
Priority: normal Keywords: easy

Created on 2008-02-03 19:58 by christian.heimes, last changed 2010-09-23 22:34 by pitrou.

Messages (5)
msg62026 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-02-03 19:58
The posix module except that a pid_t, uid_t and gid_t always fit into a
long or can be parsed by "i". On some OSes and combination of 64bit
typess and 32bit long it's an invalid assumption.

The code should use long long where available or at least do some
overflow checks.

See r1983
msg87716 - (view) Author: Daniel Diniz (ajaksu2) Date: 2009-05-13 22:02
That would be issue 1983.
msg116942 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-09-20 14:18
I'm assuming that this has never been implemented, am I correct?
msg117237 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-09-23 21:55
It appears as though this was fixed as part of issue 1983.  Antoine, can you confirm that?
msg117244 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-23 22:34
The pid_t issue was fixed but not uid_t/gid_t.
History
Date User Action Args
2010-09-23 22:34:17pitrousetmessages: + msg117244
2010-09-23 21:55:08r.david.murraysetnosy: + r.david.murray, pitrou, - BreamoreBoy

messages: + msg117237
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 3.0
2010-09-20 14:18:05BreamoreBoysetnosy: + BreamoreBoy
messages: + msg116942
2009-05-13 22:02:51ajaksu2setnosy: + ajaksu2
dependencies: + Return from fork() is pid_t, not int
messages: + msg87716
2008-02-03 19:58:43christian.heimescreate