added PYTHONUNBUFFERED=1 to the environment to make python plugins disable buffering #562
Costa Tsaousis (ktsaou) committed
Jun 16, 2016 at 21:20 UTC
15330ed08e45fbdd12144558cfc79e5bcbd9e3c0
1 file changed
+4
-1
src/main.c
+4
-1
@@ -437,7 +437,10 @@ int main(int argc, char **argv)
437
setenv("NETDATA_HOST_PREFIX", config_get("global", "host access prefix" , "") , 1);
438
setenv("HOME" , config_get("global", "home directory" , CACHE_DIR) , 1);
439
440
- // avoid extended to stat(/etc/localtime)
440
+ // disable buffering for python plugins
441
+ setenv("PYTHONUNBUFFERED", "1", 1);
442
+
443
+ // avoid flood calls to stat(/etc/localtime)
444
// http://stackoverflow.com/questions/4554271/how-to-avoid-excessive-stat-etc-localtime-calls-in-strftime-on-linux
445
setenv("TZ", ":/etc/localtime", 0);
446