• Martin Panter's avatar
    Issue #22636: avoid using a shell in the ctypes.util module · bfb15ab7
    Martin Panter yazdı
    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.
    bfb15ab7
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Programs Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
aclocal.m4 Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...