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.9 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 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 9024CBBAF for ; Tue, 5 May 2009 11:45:26 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgEBAAWo/0lQW+UCe2dsb2JhbACWdgEBFiIEt2uEAQU X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="28762687" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 05 May 2009 11:45:26 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1M1HDI-0006nx-L6 for caml-list@inria.fr; Tue, 05 May 2009 09:45:25 +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 ; Tue, 05 May 2009 09:45:24 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 May 2009 09:45:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Sys.command and quotes Date: Tue, 5 May 2009 09:45:12 +0000 (UTC) Message-ID: References: <49FFFFB5.1090403@gmail.com> 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-Spam: no; 0.00; le-gall:01 matthieu:01 dubuget:01 matthieu:01 dubuget:01 mingw:01 ocaml:01 bug:01 elided:01 ocaml:01 totaly:98 char:01 wrote:01 unix:01 quoting:02 Hello, On 05-05-2009, Matthieu Dubuget wrote: > Hello, > > I have a problem with mingw version of ocaml (compiled by hand, or with > godi). > > 1- Is the following reproducible? > > 2- If yes, do you consider this as a bug? > > It seems that in "Sys.command s", if the first and the last characters > of s are '"', they are elided? > In fact, I have done some testing about this sometimes ago and comme to the conclusion that "-handling on windows is quite weird. If and only if there is a space (or other problematic char) in your commannd/arg name you can use quoting. Otherwise it will be reported as an error. I think it is not directly related to OCaml. Maybe, I am not totaly right with my conclusion, but I can give you a simple tips: Use Unix.create_process et al that take array as arguments. It always use the good quoting. Regards Sylvain Le Gall