shotgunsoftware/browser-plugin — pull request #15 by mjmvisser (2014-11-10 16:10:06+00:00)
Title: cleanup LD_LIBRARY_PATH and LD_PRELOAD before starting processes on Linux

Hello,

This patch fixes a long-standing issue whereby processes created in the plugin crash immediately when the plugin is used with Chrome in CentOS 6, and when Chrome was installed using this method: http://chrome.richardlloyd.org.uk/

The problem was that the google-chrome script created by this method sets LD_PRELOAD and LD_LIBRARY_PATH to point to libraries from Fedora 15 and 17. This works for the Chrome executable (which is compiled against these libraries) but causes any executables compiled against native Centos 6 libs to crash immediately.

The fix is to clear paths starting with chrome's install directory from LD_LIBRARY_PATH, and to unset LD_PRELOAD completely.

Note that the plugin still needs to be compiled on Fedora 15, **not** CentOS 6.

cheers,
-Mark