Setting the Environment Variable TV_MACOS_SYSTEM
The TV_MACOS_SYSTEM environment variable allows customization of memory debugging behavior for Mac OS programs that call system(), and includes the following options:
pass_through=boolean
If true, the call to system () is passed through to the underlying implementation.
The default is false, in which case the HIA controls the call to system() as described in Calls to system() on Mac OS. Setting this option to true may be useful if you have disabled SIP.
Example: "TV_MACOS_SYSTEM=pass_through=true"
shell=<pathname>
Defines the shell for the HIA to use instead of the default bin/sh.
If defined, be sure that the SIP does not control access to this shell so that the HIA has access to it. Note that the named shell is not deleted after the return from system().
This setting may be useful to avoid any potential performance issues caused by copying the shell for each system() call., and then deleting it later.
Be aware, however, that using a previously stashed copy of bin/sh may require some maintenance, since the copy will not be updated when the operating system is updated.
The pathname must not contain commas or whitespace characters.
Example: "TV_MACOS_SYSTEM=shell=/path/to/some/copy/of/bin/sh"
tmpdir=<pathname>
Defines a temporary directory where the HIA will copy the shell (given the default setting of the option pass_through=false).
The HIA does not create the directory, assuming that it exists already. The HIA deletes the copy of the shell after processing is complete, but does not remove the directory.
If not set, the HIA creates a temporary directory in /tmp, which it removes after the call to system () completes.
Example: "TV_MACOS_SYSTEM=tmpdir=/path/to/some/directory"