Issue 16962: _posixsubprocess module uses outdated getdents system call (original) (raw)

Issue16962

Created on 2013-01-14 12:22 by riku-voipio, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
movetogetdents64.diff riku-voipio,2013-01-14 12:22 Switch to getdents64
Messages (4)
msg179937 - (view) Author: Riku Voipio (riku-voipio) Date: 2013-01-14 12:21
Getdents system call was superseded with with getdents64 in Linux 2.4 (January 2001). New architectures, such as 64-Bit ARM opt out not to support legacy system calls, and getdents is one of them. Since getdents64 has been supported for over a decade, I don't think adding ifdef to support both makes sense. Using getdents64 cleans up the current _posixsubprocess code as the entries are long long everywhere. The attached patch makes _posixsubprocess module compile on 64-Bit ARM and causes on regressions on the python3.3 testsuite on x86 and x86_64
msg183392 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2013-03-03 18:02
Gregory, do you have time to take care of this?
msg183395 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-03-03 18:53
New changeset 30e643e36bae by Gregory P. Smith in branch '3.3': Issue #16962: Use getdents64 instead of the obsolete getdents syscall in http://hg.python.org/cpython/rev/30e643e36bae New changeset 7ab1c55fcf82 by Gregory P. Smith in branch 'default': Fixes Issue #16962: Use getdents64 instead of the obsolete getdents syscall http://hg.python.org/cpython/rev/7ab1c55fcf82
msg183396 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2013-03-03 18:54
looks sane and cleaner than the silly x32 hack in there, i'll take care of it. FYI - your patch forgot to add the "unsigned char d_type;" struct member before name. fixed and applied. When i wrote that code I was probably assuming that sticking with the ancient syscall made more sense for compatibility. I'm happy to see that compatibility goes the other way on this one.
History
Date User Action Args
2022-04-11 14:57:40 admin set github: 61166
2013-03-03 18:54:48 gregory.p.smith set status: open -> closedmessages: + assignee: gregory.p.smithresolution: fixedstage: patch review -> resolved
2013-03-03 18:53:33 python-dev set nosy: + python-devmessages: +
2013-03-03 18:02:35 neologix set nosy: + neologixmessages: +
2013-01-14 15:58:37 pitrou set nosy: + gregory.p.smithstage: patch reviewtype: behaviorversions: + Python 3.4
2013-01-14 12:22:02 riku-voipio create