* Re: running gnu-win32 tools under another Unix-ported shell?
@ 1998-01-11 1:16 Tony Pires
1998-01-11 10:01 ` Scott Blachowicz
1998-01-13 12:59 ` Scott Blachowicz
0 siblings, 2 replies; 10+ messages in thread
From: Tony Pires @ 1998-01-11 1:16 UTC (permalink / raw)
To: sab; +Cc: gnu-win32
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" <earnie_boyd@hotmail.com> 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 <sab@seanet.com>
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>
>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
1998-01-11 1:16 running gnu-win32 tools under another Unix-ported shell? Tony Pires
@ 1998-01-11 10:01 ` Scott Blachowicz
1998-01-13 12:59 ` Scott Blachowicz
1 sibling, 0 replies; 10+ messages in thread
From: Scott Blachowicz @ 1998-01-11 10:01 UTC (permalink / raw)
To: Tony Pires; +Cc: gnu-win32
Tony Pires <t_pires@fox.nstn.ca> wrote:
> Is this relevant to you?
Oooo...yes...that looks like precisely what I was looking for. All I gotta do
is recover from the crashing of my boot disk to be able to test it out :-(.
Thanx!
--
Scott Blachowicz
sab@seanet.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
1998-01-11 1:16 running gnu-win32 tools under another Unix-ported shell? Tony Pires
1998-01-11 10:01 ` Scott Blachowicz
@ 1998-01-13 12:59 ` Scott Blachowicz
1 sibling, 0 replies; 10+ messages in thread
From: Scott Blachowicz @ 1998-01-13 12:59 UTC (permalink / raw)
To: Tony Pires; +Cc: gnu-win32
> 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.
Unfortunately, it uses it for something...when I just set that variable, I
get this:
(j:)common/apputils2> export PID=1
(j:)common/apputils2> find . -name '*.cpp'
(unknown) In cygwin_except_handler
(unknown) Exception trapped!
(unknown) exception C0000005 at 10018910
(unknown) exception: ax 0 bx 1 cx 144 dx 64
(unknown) exception: si 240FA28 di 0 bp 240FA3C sp 240FA18
(unknown) exception is: STATUS_ACCESS_VIOLATION
(unknown) Stack trace:
(unknown) frame 0: sp = 0x240F84C, pc = 0x1000CEC2
(unknown) frame 1: sp = 0x240F868, pc = 0x77F94512
(unknown) frame 2: sp = 0x240F88C, pc = 0x77F88EEB
(unknown) frame 3: sp = 0x240F918, pc = 0x77F76266
(unknown) frame 4: sp = 0x240FA3C, pc = 0x1000BBED
(unknown) frame 5: sp = 0x240FF94, pc = 0x1000C113
(unknown) frame 6: sp = 0x240FFA0, pc = 0x40C1C1
(unknown) frame 7: sp = 0x240FFB0, pc = 0x40103B
(unknown) frame 8: sp = 0x240FFC0, pc = 0x77F1B304
(unknown) frame 9: sp = 0x240FFF0, pc = 0x0
(unknown) End of stack trace
(unknown) In cygwin_except_handler
(unknown) Error while dumping state (probably corrupted stack)
(unknown) In cygwin_except_handler
(unknown) Error while dumping state (probably corrupted stack)
I get the same results if I set that PID to the '$$' value of my zsh
shell. Maybe it's time to go dig up some sources and see what's going on?
--
Scott Blachowicz <sab@seanet.com>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
1998-01-09 18:22 ` Scott Blachowicz
@ 1998-01-10 13:01 ` $Bill Luebkert
0 siblings, 0 replies; 10+ messages in thread
From: $Bill Luebkert @ 1998-01-10 13:01 UTC (permalink / raw)
To: sab; +Cc: Earnie Boyd, gnu-win32
Scott Blachowicz wrote:
>
> "Earnie Boyd" <earnie_boyd@hotmail.com> 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.
I have the same problem with tcsh.
I propose that cygwin32 not assume that the parent shell cannot glob
unless some env vrbl is set to indicate same.
This whole issue of interoperability with windows and windows shells
(IMHO) is not being handled right. It can't be that hard to design
a library/system that can handle globbing/non-globbing shells and
CR/CRLF/LF files. A simple environment vrbl (maybe COMSPEC or some such)
should take care of the globbing problem. As far as files go, since
noone is going to want to add a switch to each program, an environment
vrbl may have to be used here also.
--
,-/- __ _ _ $Bill Luebkert
(_/ / ) // // DBE Collectibles
/ ) /--< o // // http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_ Mailto:dbe@wgn.net
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
1998-01-08 16:46 Earnie Boyd
@ 1998-01-09 18:22 ` Scott Blachowicz
1998-01-10 13:01 ` $Bill Luebkert
0 siblings, 1 reply; 10+ messages in thread
From: Scott Blachowicz @ 1998-01-09 18:22 UTC (permalink / raw)
To: Earnie Boyd; +Cc: gnu-win32
"Earnie Boyd" <earnie_boyd@hotmail.com> 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 <sab@seanet.com>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
@ 1998-01-09 18:22 Christopher Faylor
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 1998-01-09 18:22 UTC (permalink / raw)
To: sab; +Cc: gnu-win32
>cgf@bbc.com (Christopher Faylor) wrote:
>> >How do the cygwin commands detect their parent & avoid the globbing stuff
>> >when necessary if using the normal cygwin bash, for instance? Any
>> >suggestions?
>>
>> If you are running the cygwin version of find, this should happen
>> automatically. I am running zsh here and I do this all the time.
>
>Are you running the cygwin-built version of _zsh_? I am not.
Sorry. I missed that.
Yes. I am running a cygwin version of zsh.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
1998-01-09 5:54 ` Christopher Faylor
@ 1998-01-09 18:22 ` Scott Blachowicz
0 siblings, 0 replies; 10+ messages in thread
From: Scott Blachowicz @ 1998-01-09 18:22 UTC (permalink / raw)
To: cgf; +Cc: gnu-win32
cgf@bbc.com (Christopher Faylor) wrote:
> >I'm sometimes using a port of zsh (not the one built with the cygwin
> >toolkit) and when I run the cygwin 'find' command, for instance, it acts
> >as if the 'find' command (in its crt0 or whatever?) is expanding globs
> >that it gets. I don't want that to happen because my shell is already
> >doing that. So, if I do this:
> >
> > find . -name '*.cpp' -perm +222 -ls
> >
> >to find writeable .cpp files, I get this error:
> >
> > /usr/bin/find.EXE: paths must precede expression
> > Usage: /usr/bin/find.EXE [path...] [expression]
> >
> >How do the cygwin commands detect their parent & avoid the globbing stuff
> >when necessary if using the normal cygwin bash, for instance? Any
> >suggestions?
>
> If you are running the cygwin version of find, this should happen
> automatically. I am running zsh here and I do this all the time.
Are you running the cygwin-built version of _zsh_? I am not.
Scott Blachowicz
sab@seanet.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
1998-01-08 10:46 Scott Blachowicz
@ 1998-01-09 5:54 ` Christopher Faylor
1998-01-09 18:22 ` Scott Blachowicz
0 siblings, 1 reply; 10+ messages in thread
From: Christopher Faylor @ 1998-01-09 5:54 UTC (permalink / raw)
To: gnu-win32
In article < u1zyig5y3.fsf@seanet.com >,
Scott Blachowicz <sab@seanet.com> wrote:
>Hi-
>
>I'm sometimes using a port of zsh (not the one built with the cygwin
>toolkit) and when I run the cygwin 'find' command, for instance, it acts
>as if the 'find' command (in its crt0 or whatever?) is expanding globs
>that it gets. I don't want that to happen because my shell is already
>doing that. So, if I do this:
>
> find . -name '*.cpp' -perm +222 -ls
>
>to find writeable .cpp files, I get this error:
>
> /usr/bin/find.EXE: paths must precede expression
> Usage: /usr/bin/find.EXE [path...] [expression]
>
>How do the cygwin commands detect their parent & avoid the globbing stuff
>when necessary if using the normal cygwin bash, for instance? Any
>suggestions?
If you are running the cygwin version of find, this should happen
automatically. I am running zsh here and I do this all the time.
--
http://www.bbc.com/ cgf@bbc.com "Strange how unreal
VMS=>UNIX Solutions Boston Business Computing the real can be."
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: running gnu-win32 tools under another Unix-ported shell?
@ 1998-01-08 16:46 Earnie Boyd
1998-01-09 18:22 ` Scott Blachowicz
0 siblings, 1 reply; 10+ messages in thread
From: Earnie Boyd @ 1998-01-08 16:46 UTC (permalink / raw)
To: sab; +Cc: gnu-win32
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
- \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------
>To: gnu-win32@cygnus.com
>Subject: running gnu-win32 tools under another Unix-ported shell?
>Reply-to: sab@seanet.com
>From: Scott Blachowicz <sab@seanet.com>
>Date: 08 Jan 1998 10:45:56 -0800
>
>Hi-
>
>I'm sometimes using a port of zsh (not the one built with the cygwin
>toolkit) and when I run the cygwin 'find' command, for instance, it
acts
>as if the 'find' command (in its crt0 or whatever?) is expanding globs
>that it gets. I don't want that to happen because my shell is already
>doing that. So, if I do this:
>
> find . -name '*.cpp' -perm +222 -ls
>
>to find writeable .cpp files, I get this error:
>
> /usr/bin/find.EXE: paths must precede expression
> Usage: /usr/bin/find.EXE [path...] [expression]
>
>How do the cygwin commands detect their parent & avoid the globbing
stuff
>when necessary if using the normal cygwin bash, for instance? Any
>suggestions?
>--
>Scott Blachowicz <sab@seanet.com>
>
>-
>For help on using this list (especially unsubscribing), send a message
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
* running gnu-win32 tools under another Unix-ported shell?
@ 1998-01-08 10:46 Scott Blachowicz
1998-01-09 5:54 ` Christopher Faylor
0 siblings, 1 reply; 10+ messages in thread
From: Scott Blachowicz @ 1998-01-08 10:46 UTC (permalink / raw)
To: gnu-win32
Hi-
I'm sometimes using a port of zsh (not the one built with the cygwin
toolkit) and when I run the cygwin 'find' command, for instance, it acts
as if the 'find' command (in its crt0 or whatever?) is expanding globs
that it gets. I don't want that to happen because my shell is already
doing that. So, if I do this:
find . -name '*.cpp' -perm +222 -ls
to find writeable .cpp files, I get this error:
/usr/bin/find.EXE: paths must precede expression
Usage: /usr/bin/find.EXE [path...] [expression]
How do the cygwin commands detect their parent & avoid the globbing stuff
when necessary if using the normal cygwin bash, for instance? Any
suggestions?
--
Scott Blachowicz <sab@seanet.com>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~1998-01-13 12:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-11 1:16 running gnu-win32 tools under another Unix-ported shell? Tony Pires
1998-01-11 10:01 ` Scott Blachowicz
1998-01-13 12:59 ` Scott Blachowicz
-- strict thread matches above, loose matches on Subject: below --
1998-01-09 18:22 Christopher Faylor
1998-01-08 16:46 Earnie Boyd
1998-01-09 18:22 ` Scott Blachowicz
1998-01-10 13:01 ` $Bill Luebkert
1998-01-08 10:46 Scott Blachowicz
1998-01-09 5:54 ` Christopher Faylor
1998-01-09 18:22 ` Scott Blachowicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).