@cryptotaxi247 / netdata-1 / commits / 120518e24

python.d.plugin: py2 fix crash on macos (#5838)

##### Summary Fixes: #5821 similar issue: https://github.com/ansible/ansible/issues/32499 > This is apparently due to some new security changes made in High Sierra that are breaking lots of Python things that use fork(). Rumor has it that adding export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES before your Ansible run should clear it up. The code that's causing issues is well below Ansible in the stack. ^^ multiprocessing broken on macOS python.d.plugin uses multiprocessing package Fix: - export `OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES` in case of MacOS ##### Component Name [/collectors/python.d.plugin](https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin) ##### Additional Information

Ilya Mashchenko committed Apr 11, 2019 at 19:46 UTC 120518e24862dbb7f880ede0c4f20db3df09eb3c
1 file changed +5 -1
collectors/python.d.plugin/python.d.plugin.in
+5 -1
@@ -1,5 +1,9 @@
1 #!/usr/bin/env bash
2 -'''':; exec "$(command -v python || command -v python3 || command -v python2 ||
2 +'''':;
3 +if [[ "$OSTYPE" == "darwin"* ]]; then
4 + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
5 +fi
6 +exec "$(command -v python || command -v python3 || command -v python2 ||
7 echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
8
9 # -*- coding: utf-8 -*-