cpython/Lib/ctypes
Martin Panter bfb15ab711 Issue #22636: avoid using a shell in the ctypes.util module
Replace os.popen() with subprocess.Popen. Based on patch by Victor Stinner.

If the "gcc", "cc" or "objdump" command is not available, the code was
supposed to raise an OSError exception. But there was a bug in the code. The
shell code returns the exit code 10 if the required command is missing, and the
code tries to check for the status 10. The problem is that os.popen() doesn't
return the exit code directly, but a status which should be processed by
os.WIFEXITED() and os.WEXITSTATUS(). In practice, the exception was never
raised. The OSError exception was not documented and ctypes.util.find_library()
is expected to return None if the library is not found.
2016-06-14 01:27:11 +00:00
..
macholib Issue #27125: Remove duplicated words from documentation and comments 2016-05-30 04:04:50 +00:00
test Issue #22636: avoid using a shell in the ctypes.util module 2016-06-14 01:27:11 +00:00
__init__.py Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similar 2016-02-10 05:44:01 +00:00
_endian.py Issue #22098: ctypes' BigEndianStructure and LittleEndianStructure now define an empty __slots__ so that subclasses don't always get an instance dict. 2014-08-30 00:37:18 +02:00
util.py Issue #22636: avoid using a shell in the ctypes.util module 2016-06-14 01:27:11 +00:00
wintypes.py Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers) 2010-09-28 21:08:38 +00:00