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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id BE391BB84 for ; Mon, 2 Jun 2008 09:36:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYCAE9AQ0jAXQImiGdsb2JhbACSAQEBAQ8gmWc X-IronPort-AV: E=Sophos;i="4.27,576,1204498800"; d="scan'208";a="11425403" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 02 Jun 2008 09:36:45 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m527aieb025425 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 2 Jun 2008 09:36:45 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj4IAIg/Q0hVDf8pZWdsb2JhbACSARICHplj X-IronPort-AV: E=Sophos;i="4.27,576,1204498800"; d="scan'208";a="13355899" Received: from colo3.ukhost4u.com ([85.13.255.41]) by mail3-smtp-sop.national.inria.fr with ESMTP; 02 Jun 2008 09:36:44 +0200 Received: from [87.194.195.163] (helo=feast.config) by colo3.ukhost4u.com with esmtpa (Exim 4.69) (envelope-from ) id 1K34aw-0000dQ-3i; Mon, 02 Jun 2008 08:36:42 +0100 Cc: caml-list@inria.fr Message-Id: <37E71E9C-58BA-4530-B6A0-5C8DACE9A714@coherentgraphics.co.uk> From: John Whitington To: Sylvain Le Gall In-Reply-To: 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: Re: [Caml-list] Re: Pipes and Standard Output / Input on Windows Date: Mon, 2 Jun 2008 08:36:41 +0100 References: <3C72DA5E-36A7-411B-AFFA-EE26DA74D9B5@coherentgraphics.co.uk> 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 discorde with ID 4843A30D.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 stdin:01 wrote:01 wrote:01 encode:01 msvc:01 caml-list:01 cleanly:01 bin:01 variant:02 data:02 On 1 Jun 2008, at 22:06, Sylvain Le Gall wrote: > On 29-05-2008, John Whitington wrote: >> >> 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?) Still no clue on this one, I'm afraid. >> (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? >> > > I am not sure if it is related, but i have a problem with "|" command > line pipe. It seems that this way channel are not binary one... If you > happen to transmit binary data through it, you could have problem... > > I detect it, by trying "output_value stdin x". > > Do you think your problem is related? It seems this is correct. See the section "Problems with Pipes" here: http://dev.mysql.com/doc/refman/5.0/en/windows-vs-unix.html So I'll need to encode the data somehow, or introduce my own chaining separator on the command line. -- John Whitington Coherent Graphics Ltd http://www.coherentpdf.com/