caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Corrupt output of printf
@ 2009-01-22 17:22 Dawid Toton
  2009-01-23 11:20 ` [Caml-list] (Not) corrupt " Dawid Toton
  0 siblings, 1 reply; 5+ messages in thread
From: Dawid Toton @ 2009-01-22 17:22 UTC (permalink / raw)
  To: caml-list

I have a program, which output is produced only with Printf.printf .
This inner part is executed by another one (outer) using Unix.system . 
The outer executable uses print_endline before and after the inner is run.

 From time to time the output of the inner program is corrupt.

Printf.printf seemingly devours parts of single lines, as in these 
examples (all lines should have the same structure):

156 In: 5.483000, 1.500000, 1.760000
157 Sb: 5.008000, 1.494000, 1.500000
158 In: 4.498000, 1.494000, 0.750000
159160 Sb: 5.003000, 1.503000, 0.508000

Another one:

138 In: 5.000000, 0.000000, 0.253000
139 In: 5.001000, 1.000140 Sb: 5.500000, 0.000000, 0.000000
141 Sb: 5.500000, 1.000000, 0.000000

This isn't easily reproducible as it happens rarely; subsequent runs are OK.

Could anybody find a possible cause of this behavior?

Dawid


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-23 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 17:22 Corrupt output of printf Dawid Toton
2009-01-23 11:20 ` [Caml-list] (Not) corrupt " Dawid Toton
2009-01-23 13:16   ` Richard Jones
2009-01-23 14:20     ` Dawid Toton
2009-01-23 15:53       ` Eric Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).