<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/e4715fef3a3c4def40473db2f9f4e252"
  from="Dawid Toton &lt;dawid.toton@u...&gt;"
  author="Dawid Toton"
  date="2009-01-22T17:22:23"
  subject="Corrupt output of printf"
  prev="2009/01/f6735e5adf3e71e22f286197791245f5"
  next="2009/01/fa9227573533dbb2e2f2c661349a8632"
  next-in-thread="2009/01/c631394ba385c68b864e884371aa9051"
  prev-thread="2009/01/f6735e5adf3e71e22f286197791245f5"
  next-thread="2009/01/fa9227573533dbb2e2f2c661349a8632"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Corrupt output of printf">
<msg 
  url="2009/01/e4715fef3a3c4def40473db2f9f4e252"
  from="Dawid Toton &lt;dawid.toton@u...&gt;"
  author="Dawid Toton"
  date="2009-01-22T17:22:23"
  subject="Corrupt output of printf">
<msg 
  url="2009/01/c631394ba385c68b864e884371aa9051"
  from="Dawid Toton &lt;d0@w...&gt;"
  author="Dawid Toton"
  date="2009-01-23T11:20:41"
  subject="Re: [Caml-list] (Not) corrupt output of printf">
<msg 
  url="2009/01/07f8ae5aeb654567b36bd16c1f625f44"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-01-23T13:16:39"
  subject="Re: [Caml-list] (Not) corrupt output of printf">
<msg 
  url="2009/01/5d29f0ed559cefbbf25d94935aa405b8"
  from="Dawid Toton &lt;d0@w...&gt;"
  author="Dawid Toton"
  date="2009-01-23T14:20:48"
  subject="Re: [Caml-list] (Not) corrupt output of printf">
<msg 
  url="2009/01/687b7043920357f05d52e3fd913a1832"
  from="Eric Cooper &lt;ecc@c...&gt;"
  author="Eric Cooper"
  date="2009-01-23T15:53:51"
  subject="Re: [Caml-list] (Not) corrupt output of printf">
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
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

</contents>

</message>

