homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _posixsubprocess module uses outdated getdents system call
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, neologix, python-dev, riku-voipio
Priority: normal Keywords: patch

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:40adminsetgithub: 61166
2013年03月03日 18:54:48gregory.p.smithsetstatus: open -> closed
messages: + msg183396

assignee: gregory.p.smith
resolution: fixed
stage: patch review -> resolved
2013年03月03日 18:53:33python-devsetnosy: + python-dev
messages: + msg183395
2013年03月03日 18:02:35neologixsetnosy: + neologix
messages: + msg183392
2013年01月14日 15:58:37pitrousetnosy: + gregory.p.smith
stage: patch review
type: behavior

versions: + Python 3.4
2013年01月14日 12:22:02riku-voipiocreate

AltStyle によって変換されたページ (->オリジナル) /