diff options
author | Dan Willemsen <dwillemsen@google.com> | 2018-05-21 14:39:43 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-05-25 14:07:00 -0700 |
commit | c59a92cb1a73468a0e2af7102632dda48d811f5b (patch) | |
tree | 9595c290b38d5cf69ad5d4c9e6b36c1fb14791aa /python | |
parent | c039ab084d61cb1af1938f77000a147ed6b4e25b (diff) | |
download | build_soong-c59a92cb1a73468a0e2af7102632dda48d811f5b.tar.gz build_soong-c59a92cb1a73468a0e2af7102632dda48d811f5b.tar.bz2 build_soong-c59a92cb1a73468a0e2af7102632dda48d811f5b.zip |
Revert "Revert "Add path interposer""
This reverts commit 96c957ae20d8418f85cf10b4ee06ce9781d86c47.
Fixes issues on some machines where the socket in TMPDIR ended up with a
unix domain socket pathname over 107 characters long, which Go will
reject due to underlying limitations in the system calls. If this
happens, we'll fall back to opening the directory, then using
/proc/self/fd/#/<file>, or manually creating a similar symlink in /tmp.
Also fixes some issues on Mac where os.Executable returns the symlink
instead of the underlying file, sending a message over a unix domain
socket will block if the reader isn't reading, and sandboxing was
preventing us from running `ps`.
Test: m blueprint_tools
Test: m blueprint_tools on mac
Change-Id: Ib19ccfe10cb0a79f1476fb1d5cd20ed0495be367
Diffstat (limited to 'python')
-rw-r--r-- | python/scripts/stub_template_host.txt | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/python/scripts/stub_template_host.txt b/python/scripts/stub_template_host.txt index b90a28b5..386298eb 100644 --- a/python/scripts/stub_template_host.txt +++ b/python/scripts/stub_template_host.txt @@ -18,8 +18,6 @@ def SearchPathEnv(name): for directory in search_path: if directory == '': continue path = os.path.join(directory, name) - if os.path.islink(path): - path = os.path.realpath(path) # Check if path is actual executable file. if os.path.isfile(path) and os.access(path, os.X_OK): return path |