[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [C stubdom] printf to console not complete



Dear all,

This is Lele Ma, a graduate student from The College of William and Mary. I am playing with c-stubdom on Xen-4.9.1 and encountered problems when do printings using printf. 

It seems that if I print many lines of strings consecutively, many lines would got cut at the tail. 
Here is an example code I tested in C stubdom:

// file /stubdom/c/main.c

int main(void) {  
  int i = 0;
  for (i=0; i< 1000; i++){
    printf("print %d \n", i);
  }
  return 0;
}

After build and run, the output got cut in the middle and only the first ~400 lines got printed, as following:

------------- output begin --------------------- 

root@xen-4.9.1: c # xl create -c ../../extras/mini-os/domain_config
Parsing config from ../../extras/mini-os/domain_config
...              
print 427    <---looks good
print 428
print 429
print 430
print 431
print 432
print 433
print 434   <--- prints got cut here (should print to 999), and different executions got cut in different lines.
root@xen-4.9.1: c #

------------ output end -----------------------

However, if I use sleep(1) after every printf, it could print all lines. 

Could anyone give any hints about what is happening here? And where need to be fixed to get all printings properly with printf?

Best,
Lele






_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.