From d8ae32ec4183b121b207fbfb84d4be726f0cdb8f Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <tridge@samba.org>
Date: Wed, 3 Mar 2010 14:28:42 +1100
Subject: dns: make dns update script use unbuffered IO

Otherwise we can lose debug output when a timeout happens
---
 source4/scripting/bin/samba_dnsupdate | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'source4/scripting')

diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 9eaf3df272..d8ad20047e 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -24,6 +24,10 @@ import sys
 import dns.resolver
 import tempfile
 
+# ensure we get messages out immediately, so they get in the samba logs,
+# and don't get swallowed by a timeout
+os.putenv('PYTHONUNBUFFERED', '1')
+
 # Find right directory when running from source tree
 sys.path.insert(0, "bin/python")
 
-- 
cgit