Subject: Re: running gnu-win32 tools under another Unix-ported shell?
From: [email-masked] (Tony Pires)

11 Jan 1998 08:04:10 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
Cc: [email-masked]

Is this relevant to you?

The following is from the FAQ.txt for gnu-win32 beta 18 release, May 7, 1997

How does wildcarding (globbing) work?
=====================================

   If an application using CYGWIN.DLL starts up, and can't find the
`PID' environment variable, it assumes that it has been started from
the a DOS style command prompt.  This is pretty safe, since the rest of
the tools (including bash) set PID so that a new process knows what PID
it has when it starts up.

   If the DLL thinks it has come from a DOS style prompt, it runs a
`globber' over the arguments provided on the command line.  This means
that if you type `LS *.EXE' from DOS, it will do what you might expect.

   Beware: globbing uses `malloc'.  If your application defines
`malloc', that will get used.  This may do horrible things to you.

Cheers

At 10:14 AM 1/9/98 -0800, you wrote:
>"Earnie Boyd" <[email-masked]> writes:
>
>> Don't know if this will help; but, try using the double quote instead of 
>> the single quote.  ie: find . -name "*.cpp" -perm 222 -ls
>
>Nope...doesn't matter.  I'm running a normal Unix type shell - the quotes
>get stripped by the shell before they get to the sub-process.
>
>What I'm betting on (without having seen the cygwin source code) is that
>the crt0 (or whatever gets run before main() is called) is detecting
>whether or not it is being run by something that expands glob patterns
>(e.g. the cygwin bash).  I'm guessing that the pre-main() code in find.exe
>is deciding that it got run by command.com or something that doesn't
>expand glob patterns.  My zsh shell (from ftp://ftp.blarg.net/users/amol/)
>IS expanding glob patterns and find.exe (possibly by way of this
>pre-main() code) IS also expanding the glob patterns it sees.  So, I'm
>trying to figure out if there's a way to let cygwin-built programs know
>that the parent shell already does expand the glob patterns.
>-- 
>Scott Blachowicz                <[email-masked]>
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"[email-masked]" with one line of text: "help".
>
>

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".