ia64/xen-unstable

changeset 2500:8c94f94b6b2b

bitkeeper revision 1.1159.79.5 (414eb5ccBh7RW8Eo9mCc8WaCqLx0Kg)

Ensure we get output from C extensions via stdout/stderr, by disabling
default stream buffering.
author kaf24@freefall.cl.cam.ac.uk
date Mon Sep 20 10:49:48 2004 +0000 (2004-09-20)
parents 5e2937aebf2c
children 691d8544fd52
files tools/python/xen/lowlevel/xc/xc.c tools/python/xen/lowlevel/xu/xu.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Mon Sep 20 09:57:48 2004 +0000
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Mon Sep 20 10:49:48 2004 +0000
     1.3 @@ -1320,4 +1320,8 @@ PyMODINIT_FUNC initxc(void)
     1.4      PyDict_SetItemString(d, "error", xc_error);
     1.5  
     1.6      zero = PyInt_FromLong(0);
     1.7 +
     1.8 +    /* KAF: This ensures that we get debug output in a timely manner. */
     1.9 +    setbuf(stdout, NULL);
    1.10 +    setbuf(stderr, NULL);
    1.11  }
     2.1 --- a/tools/python/xen/lowlevel/xu/xu.c	Mon Sep 20 09:57:48 2004 +0000
     2.2 +++ b/tools/python/xen/lowlevel/xu/xu.c	Mon Sep 20 10:49:48 2004 +0000
     2.3 @@ -1438,4 +1438,8 @@ PyMODINIT_FUNC initxu(void)
     2.4      d = PyModule_GetDict(m);
     2.5      port_error = PyErr_NewException(XENPKG ".PortError", NULL, NULL);
     2.6      PyDict_SetItemString(d, "PortError", port_error);
     2.7 +
     2.8 +    /* KAF: This ensures that we get debug output in a timely manner. */
     2.9 +    setbuf(stdout, NULL);
    2.10 +    setbuf(stderr, NULL);
    2.11  }