This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug Report File globbing in CMD shell


--- Dirk Fieldhouse <fieldhouse@logica.com> wrote:
> On Thu, 10 Jun 1999 15:17:33 -0400, cgf <cygwin@sourceware.cygnus.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

Hi Dirk,

You might want to check the archives for both the Cygwin and Mingw32 lists as
well as the MS usenet groups.  Your problem is going to be related to the way
that MS handles the command line and interacting with the two runtimes.  There
are workarounds but nothing easy.

Good Luck,

=====
Earnie Boyd <mailto:earnie_boyd@yahoo.com>
Cygwin Newbies, please visit
<http://www.freeyellow.com/members5/gw32/index.html>
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]