From: BitKeeper B. <ri...@su...> - 2004-09-20 11:01:04
|
ChangeSet 1.1325, 2004/09/20 11:49:48+01:00, ka...@fr... Ensure we get output from C extensions via stdout/stderr, by disabling default stream buffering. xc/xc.c | 4 ++++ xu/xu.c | 4 ++++ 2 files changed, 8 insertions(+) diff -Nru a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c 2004-09-20 07:00:59 -04:00 +++ b/tools/python/xen/lowlevel/xc/xc.c 2004-09-20 07:00:59 -04:00 @@ -1320,4 +1320,8 @@ 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 -Nru a/tools/python/xen/lowlevel/xu/xu.c b/tools/python/xen/lowlevel/xu/xu.c --- a/tools/python/xen/lowlevel/xu/xu.c 2004-09-20 07:00:59 -04:00 +++ b/tools/python/xen/lowlevel/xu/xu.c 2004-09-20 07:00:59 -04:00 @@ -1438,4 +1438,8 @@ 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); } |