This is the mail archive of the cygwin@cygwin.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: Strange PATH behavior with 1.3.1


I'd like to get some strace output.  I really would.  Running my script with
"strace -o strace.out -f <scriptname>" leaves me with an "strace.out" file
of zero size.  It seems to not do anything when run on a script.

Originally, I had 1.1.8 fully installed.  I upgraded to 1.3.1 this morning,
saw the problem, then re-ran setup and set the version on the "cygwin"
module to 1.1.8, which restored the correct (?) behavior.  I guess I can now
try saving a copy of the cygwin1.dll file and rerunning setup to get the
1.3.1 version, so I can more easily switch back and forth for testing (if
that makes any sense).

-----Original Message-----
From: Christopher Faylor [mailto:cgf@redhat.com]
Sent: Monday, April 30, 2001 2:42 PM
To: 'cygwin@cygwin.com'
Subject: Re: Strange PATH behavior with 1.3.1


On Mon, Apr 30, 2001 at 01:45:18PM -0700, Karr, David wrote:
>I use a technique of putting shell script "wrappers" earlier in the path
>than programs being "wrapped".  I also use a script that can return the
>second (or nth) occurrence of an executable in the PATH.  This has worked
>fine for a long time, at 2 jobs before this, and here, when I had 1.1.8
>installed.  I just installed 1.3.1 a few minutes ago, and now I see that
>this doesn't work anymore.
>
>I can ask my script which manually searches the path to return all the
>occurrences of a particular executable name, in the order it finds them.
>Using this, I see that I have my "wrapper" script earlier in the PATH than
>the program it's wrapping.  However, when I execute the command, it never
>executes my wrapper script, it always executes the program I'm trying to
>wrap.  The output of "type -p" shows that it didn't find my wrapper script
>first.  The output of "type -a" shows that it didn't find my wrapper script
>at ALL.  If I specify the full path to my wrapper script, it executes fine.

I just tested this by putting a 'vi' script in '/usr/local/bin'.
/usr/local/bin
is first in my path.  When I execute bash and type 'vi', I get my script.
When
I execute /bin/sh and type 'vi', I get my script.

When I execute tcsh and type 'vi', aha!, I get /bin/vi.  But, that was
because
tcsh sets the PATH so that /usr/local/bin was second.  When I put
/usr/local/bin
first it works fine.

So, I can't duplicate this behavior.  If you can execute the wrapper script
it must be executable, so bash should find it when you do a path search.

Possibly the output of strace would be instructive.  I'm not asking you to
post
the strace output here.  Rather inspect it and see what is different between
1.1.8 and 1.3.1.

I'm assuming that when you say 1.1.8, you are actually just updating the DLL
and not bash and a bunch of other independent variables...

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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