argv returning strange filename

Maarten Bezemer m.m.bezemer at
Thu Mar 18 05:25:47 PST 2004


I'm busy again updating CVS and SSHLib to their newest versions.

But while I was testing CVS I found a strange problem.
CVS uses argv[0] to get the program path which is needed by some
commands to start a new instance (using popen() ).
The value of argv[0] is something like:
instead of

Well it's obvious that CVS can't find itself when using the returned
value. Is this an expected kind of behaviour or is it a bug?
(It's the first piece of code after main() is called)

I'm using gcc (and unixlib) version 2.95.4 release 3 (released 05
January 2003)

Could someone help?

PS I'm plesantly surprised that things like popen() are working fine!
Good work!

Maarten Bezemer

More information about the gcc mailing list