From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 301CBBBAF for ; Thu, 22 Jan 2009 18:22:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4EAJs5eEmVnFmTgWdsb2JhbACTewEBFiKoCYZviDGFcw X-IronPort-AV: E=Sophos;i="4.37,307,1231110000"; d="scan'208";a="22912463" Received: from mail.uj.edu.pl ([149.156.89.147]) by mail1-smtp-roc.national.inria.fr with ESMTP; 22 Jan 2009 18:22:22 +0100 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [137.73.5.196] by mail.uj.edu.pl (Sun Java(tm) System Messaging Server 6.3-5.02 (built Oct 12 2007; 32bit)) with ESMTPA id <0KDV00IH1UX89Q70@mail.uj.edu.pl> for caml-list@yquem.inria.fr; Thu, 22 Jan 2009 18:22:22 +0100 (CET) Message-id: <4978AB4C.7000900@uj.edu.pl> Date: Thu, 22 Jan 2009 17:22:20 +0000 From: Dawid Toton User-Agent: Thunderbird 1.5.0.12 (X11/20090107) To: caml-list@yquem.inria.fr Subject: Corrupt output of printf X-Spam: no; 0.00; printf:01 printf:01 endline:01 unix:01 rarely:02 output:02 output:02 executable:03 examples:07 anybody:07 structure:07 uses:07 runs:11 inner:12 inner:12 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