Date: Mon, 23 Apr 2001 13:27:34 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Jim Meyering cc: Richard Dawe , DJGPP workers Subject: Re: (Fileutils) More test suite & Fetish.pm problems In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 22 Apr 2001, Jim Meyering wrote: > If I understand, those problems are all because a program invoked > like `mv a b' will get argv[0] set to ../../src/mv. Is that true? That's one possibility, yes. It's also possible to get the full absolute file name in argv[0], as in "c:/foo/bar/bin/mv.exe". > If so, I wonder if that's a problem with the way djgpp's bash calls exec. It's not a Bash problem, it's a ``feature'' of the DOS system call which loads and executes a program: you always get leading directories in argv[0]. Bash cannot work around this. I don't think Posix mandates that argv[0] should not include leading directories. I think some Unix shells do produce argv[0] similar to ../../src/mv. So I think it would be good for Fetish test suites not to depend on the exact form of argv[0] too much.