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.2 required=5.0 tests=AWL 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 E8498BBAF for ; Thu, 29 May 2008 15:39:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhgCAJdOPkjAXQIniGdsb2JhbACSKQEBAQ8gnRQ X-IronPort-AV: E=Sophos;i="4.27,561,1204498800"; d="scan'208";a="12907796" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 May 2008 15:39:03 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4TDd37E027175 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 29 May 2008 15:39:03 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIIAJdOPkhVDf8pZWdsb2JhbACSKRICHp0U X-IronPort-AV: E=Sophos;i="4.27,561,1204498800"; d="scan'208";a="11286507" Received: from colo3.ukhost4u.com ([85.13.255.41]) by mail2-smtp-roc.national.inria.fr with ESMTP; 29 May 2008 15:39:03 +0200 Received: from [91.84.121.145] (helo=[192.168.0.8]) by colo3.ukhost4u.com with esmtpa (Exim 4.69) (envelope-from ) id 1K1iLM-0002OS-Jx for caml-list@inria.fr; Thu, 29 May 2008 14:39:00 +0100 Message-Id: <3C72DA5E-36A7-411B-AFFA-EE26DA74D9B5@coherentgraphics.co.uk> From: John Whitington To: caml-list@inria.fr Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Pipes and Standard Output / Input on Windows Date: Thu, 29 May 2008 14:39:00 +0100 X-Mailer: Apple Mail (2.919.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - colo3.ukhost4u.com X-AntiAbuse: Original Domain - inria.fr X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Miltered: at concorde with ID 483EB1F7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 command-line:01 toolchain:01 stdout:01 stdout:01 msvc:01 cleanly:01 bin:01 variant:02 data:02 data:02 compiling:02 graphics:02 binary:02 exits:02 Hullo. I'm compiling OCaml command-line software with the MSVC toolchain on Windows. Users have noticed two problems: (a) When output (such as the --help) is done on Windows, the help doesn't all show (I fixed this by flushing stdout manually - but shouldn't stdout be flushed when the process exits anyway?) (b) Chaining invocations of the tool together using pipes on Windows often fails. The second process in the chain gets an End_Of_File after only a few hundred bytes of data. I've confirmed the data is all being output by the first process, and the first process is exiting cleanly. All the open_in and open_out calls are using the _bin variant. The data being sent down the pipe is a PDF file (which contains binary sections). Neither of these problems occur on Linux / Mac builds - is there something about windows pipes I should know? -- John Whitington Coherent Graphics Ltd http://www.coherentpdf.com/