[pypy-commit] pypy default: Merged in tpruzina/pypy (pull request #581)

arigo pypy.commits at gmail.com
Mon Nov 13 17:45:56 EST 2017


Author: Armin Rigo <armin.rigo at gmail.com>
Branch: 
Changeset: r93010:27b914ed1ea1
Date: 2017-11-13 22:45 +0000
http://bitbucket.org/pypy/pypy/changeset/27b914ed1ea1/

Log:	Merged in tpruzina/pypy (pull request #581)

	fix detect_pax behavior on linux if procfs is mounted with
	hidepid>=1

	Approved-by: Vadim A. Misbakh-Soloviov <atlassian at mva.name>

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


More information about the pypy-commit mailing list