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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id F34E9BBAF for ; Fri, 30 May 2008 17:13:51 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag8CANO2P0jAXQImiGdsb2JhbACSLwEBAQ8gnDU X-IronPort-AV: E=Sophos;i="4.27,567,1204498800"; d="scan'208";a="13270699" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 30 May 2008 17:12:35 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4UFCZRO004920 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 30 May 2008 17:12:35 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An0AAGe2P0hQW+UCmmdsb2JhbACSLwEBAQEBCAUIBxEEnDQ X-IronPort-AV: E=Sophos;i="4.27,566,1204498800"; d="scan'208";a="12973848" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 May 2008 17:12:35 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K26HO-0007gf-UG for caml-list@inria.fr; Fri, 30 May 2008 15:12:30 +0000 Received: from ks300734.kimsufi.com ([91.121.65.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 May 2008 15:12:30 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 May 2008 15:12:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Pipes and Standard Output / Input on Windows Date: Fri, 30 May 2008 15:12:21 +0000 (UTC) Message-ID: References: <3C72DA5E-36A7-411B-AFFA-EE26DA74D9B5@coherentgraphics.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks300734.kimsufi.com User-Agent: slrn/pre0.9.9-102 (Linux) Sender: news X-Miltered: at discorde with ID 48401963.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; le-gall:01 ocaml:01 ocaml's:01 wrote:01 unix:01 functions:01 api:02 output:02 output:02 pipes:04 problem:05 routines:06 underlying:06 context:06 standard:07 On 29-05-2008, David Allsopp wrote: >> Yep, on windows GetStdHandle doesn't always return the same kind of >> handle depending on the context: >> - if the output/input is console, it is console handle (i.e. need to be >> manipulated through console function) >> - if the output/input is a pipe, it is a pipe handle (i.e. need to be >> manipulated through pipe function) > > Both these kinds of HANDLE work transparently with ReadFile/WriteFile API > functions so should be fine with the underlying OCaml calls (OCaml's file > I/O is based on the C I/O routines which won't be using > ReadConsole/WriteConsole) - what scenario are you referring to where the > difference between a console handle and a pipe would be a problem? > "Unix.select"? Regards, Sylvain Le Gall