delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/12/16/17:06:29

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <001301bf4811$b8533d10$0444ea9e@logica.co.uk>
From: "Dirk Fieldhouse" <fieldhouse AT logica DOT com>
To: <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Bug Report File globbing in CMD shell
Date: Thu, 16 Dec 1999 22:05:45 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

On Thu, 10 Jun 1999 15:17:33 -0400, cgf <cygwin AT sourceware DOT cygnus DOT com>
wrote:

> ...>
>
> As I stated in another mail, the arguments to a cygwin program are not
> globbed unless an unquoted wildcard character is seen.  Cygwin does
> collapse a quoted backslash to a backslash, however.  It also leaves
> single backslashes, that do not quote anything "special", alone.
>...>

This isn't true in B20.1 as far as I can see. I'm interested in launching a
cygwin process from a non-cygwin app and it looks as if all single \s are
being stripped from the command line args. I'm guessing that this results
from globify-ing argv[1]..argv[argc-1] as in dcrt0.cc (build_argv). However
setting the CYGWIN environment to include noglob doesn't stop this (or maybe
I'm doing it wrong). I presume there is a way to force the allow_glob flag
in dcrt0.cc off, short of including build_argv in my program, but I haven't
found it yet.

(Whereas if the program is run from bash, the \s are stripped by bash before
my program's GetCommandLine() gets to see them).

A further syntactic collision occurs with execvp: it gets a file name
without spaces when called in a program run from bash, but a full /Program
Files/ought/to/be/bin name when run from cmd.exe: -> /Program: not found

I suppose this is all Digital's fault for introducing the / switch character
that DR and M$ copied - but at least they didn't accept anything as bizarre
as c:[Program Files.cygnus]cygnus.bat


--
Dirk Fieldhouse                 Logica UK Limited
fieldhouse AT logica DOT com           75 Hampstead Road
c=gb;a=attmail;p=logica;        London NW1 2PL
o=LOGICA;ou1=UK;s=fieldhouse    UK
+44 (20) 7637 9111
not speaking for Logica




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019