Thomas Munro <thomas.mu...@gmail.com> writes: > I wish I could find the Xnu source that shows exactly how and when the > environment is suppressed in this way to understand better, but it > doesn't jump out of Apple's github; maybe it's hiding in closed source > machinery...
I recall that we figured out awhile ago that the environment gets trimmed when make (or whatever) executes some command via the shell; seemingly, Apple has decided that /bin/sh is a security-critical program that mustn't be run with a non-default DYLD_LIBRARY_PATH. Dunno if that helps you find where the damage is done exactly. (The silliness of this policy, when you pair it with the fact that they don't reset PATH at the same time, seems blindingly obvious to me. But apparently not to Apple.) regards, tom lane