All of lore.kernel.org
 help / color / mirror / Atom feed
* [C stubdom] printf to console not complete
@ 2018-03-26 10:44 Lele Ma
  0 siblings, 0 replies; only message in thread
From: Lele Ma @ 2018-03-26 10:44 UTC (permalink / raw)
  To: minios-devel; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1244 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1578 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-26 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 10:44 [C stubdom] printf to console not complete Lele Ma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.