diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 840a954e94..9d73b04114 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -1320,4 +1320,8 @@ PyMODINIT_FUNC initxc(void) PyDict_SetItemString(d, "error", xc_error); zero = PyInt_FromLong(0); + + /* KAF: This ensures that we get debug output in a timely manner. */ + setbuf(stdout, NULL); + setbuf(stderr, NULL); } diff --git a/tools/python/xen/lowlevel/xu/xu.c b/tools/python/xen/lowlevel/xu/xu.c index f31d54b527..7bf82e483a 100644 --- a/tools/python/xen/lowlevel/xu/xu.c +++ b/tools/python/xen/lowlevel/xu/xu.c @@ -1438,4 +1438,8 @@ PyMODINIT_FUNC initxu(void) d = PyModule_GetDict(m); port_error = PyErr_NewException(XENPKG ".PortError", NULL, NULL); PyDict_SetItemString(d, "PortError", port_error); + + /* KAF: This ensures that we get debug output in a timely manner. */ + setbuf(stdout, NULL); + setbuf(stderr, NULL); }