delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/04/23/12:10:01

Date: Mon, 23 Apr 2001 13:27:34 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jim Meyering <jim AT meyering DOT net>
cc: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>,
DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: (Fileutils) More test suite & Fetish.pm problems
In-Reply-To: <uryeluldwe5.fsf@ixi.eng.ascend.com>
Message-ID: <Pine.SUN.3.91.1010423132702.25673D-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019