Subject: Re: CVS commit: src/bin/test
To: Wolfgang Solfrank <ws@TooLs.DE>
From: Christos Zoulas <>
List: source-changes
Date: 08/04/2006 12:42:23
On Aug 4,  5:11pm, ws@TooLs.DE (Wolfgang Solfrank) wrote:
-- Subject: Re: CVS commit: src/bin/test

| Hi,
| > use getprogname() instead of argv[0], because some programs that execv, pass
| > the full path in argv[0] instead of just the basename. In reality, those
| > programs should be fixed (hello gdb for example).
| Like any shell on any U*X or alike system I ever used in the last 27
| years?  You've got to be kidding!

Shells don't behave this way. If you run:

$ ps
ps gets argv[0] = "ps"
$ /bin/ps
ps gets argv[0] = "/bin/ps"

In gdb this is not the case and this is a bug.

$ gdb ps
ps gets argv[0] = "/bin/ps"

But I've only been using shells for 25 years ;-)