Author: Tomáš Pružina <[email protected]>
Branch:
Changeset: r93009:368d2eef1229
Date: 2017-11-05 05:46 +0100
http://bitbucket.org/pypy/pypy/changeset/368d2eef1229/
Log: fix detect_pax behavior on linux where procfs is mounted with
hidepid>=1
PID1 (init) isn't observable on systems with procfs mounted with
hidepid=1,2 unless build runs under root (for example on Gentoo
where package manager compiles under user 'portage'). This can be
fixed by replacing /proc/1/status with /proc/self/status (which is
visible to the build script).
diff --git a/rpython/config/support.py b/rpython/config/support.py
--- a/rpython/config/support.py
+++ b/rpython/config/support.py
@@ -41,8 +41,8 @@
Function to determine if your system comes with PAX protection.
"""
if sys.platform.startswith('linux'):
- # we need a running process PID and 1 is always running
- with open("/proc/1/status") as fd:
+ # use PID of current process for the check
+ with open("/proc/self/status") as fd:
data = fd.read()
if 'PaX' in data:
return True
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit