Re: `which` and infinite recursion

2002-06-23 Thread Vineet Kumar
* Bob Proulx ([EMAIL PROTECTED]) [020623 14:19]: > You were using /bin/ash not /bin/sh. I know nothing about ash, please Well, you're not going to find the "real" /bin/sh Free anywhere, so that's about as close as it gets. > educate me. Is ash ever a possible /bin/sh? Does ash claim POSIX > sh

Re: `which` and infinite recursion

2002-06-23 Thread John Hasler
Bob writes: > Is ash ever a possible /bin/sh? Yes. Scripts that start with #! /bin/sh and fail when /bin/sh points to ash are broken. > Does ash claim POSIX shell syntax compliance? ash is about as POSIX as it gets. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin -- T

Re: `which` and infinite recursion

2002-06-23 Thread Bob Proulx
> > I would probably file a bug against which that it should use #!/bin/sh > > instead of #!/bin/bash. > > Ah, that would be a bad idea unless it's also rewritten: > > $ ash /usr/bin/which gcc > enable: not found > -p: not found > gcc is /usr/bin/gcc > > ('enable' and 'type -p' are bashi

Re: `which` and infinite recursion

2002-06-22 Thread Colin Watson
On Sat, Jun 22, 2002 at 09:23:47PM -0600, Bob Proulx wrote: > I would probably file a bug against which that it should use #!/bin/sh > instead of #!/bin/bash. Ah, that would be a bad idea unless it's also rewritten: $ ash /usr/bin/which gcc enable: not found -p: not found gcc is /usr/bin/

Re: `which` and infinite recursion

2002-06-22 Thread Craig Dickson
begin Joseph Barillari quotation: > I just switched from Red Hat to Debian and was wondering why any > invocation of `bash` or `which` caused the forking of hundreds of > processes and (eventually) the complaint: > > /bin/bash: fork: Resource temporarily unavailable > > I investigated my .bash

Re: `which` and infinite recursion

2002-06-22 Thread Bob Proulx
> /bin/bash: fork: Resource temporarily unavailable > I investigated my .bashrc, and found that the offending line was > export CVS_RSH=`which ssh` [...] > Is there any way to avoid it with the Debian `which`? Enclosing the [...] > Any suggestions? Or should I just use the Red Hat `which` binary?

Re: `which` and infinite recursion

2002-06-22 Thread Colin Watson
On Sat, Jun 22, 2002 at 10:54:15PM -0400, Joseph Barillari wrote: > I investigated my .bashrc, and found that the offending line was > > export CVS_RSH=`which ssh` > > Because `which` is implemented as a bash script, invoking it causes > .bashrc to be read, and `which ssh` to be evaluated, which