If I invoke

DYLD_X=foo /bin/bash -c 'echo "<$DYLD_X>"'

the output is



MY_VAR=bar /bin/bash -c 'echo "<$MY_VAR>"'



Switching to Bash 5:

DYLD_X=foo /usr/local/bin/bash -c 'echo "<$DYLD_X>"'

the output is

dyld: warning, unknown environment variable: DYLD_X

I would think that dyld should only monitor variables that it knows about. Is there anything that can be done to control this behavior?

MacOS Mojave 10.14.4

  • 1
    Macos does not like dyld variables the latest versions use sip and remove them. What are you trying to do – user151019 Apr 25 at 13:24
  • @Mark: I'm just trying to understand why this seemingly odd behavior occurs. – Paused until further notice. Apr 25 at 13:26
  • Basically Apple thinks it is insecure a way of injected unfriendly code into normal apps – user151019 Apr 25 at 13:32