argv returning strange filename

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


Hi,

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:
:Veger.$.foo.bar.cvs
instead of
ADFS::Veger.$.foo.bar.cvs

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?
  Maarten

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

--
Maarten Bezemer

http://home.student.utwente.nl/m.m.bezemer/




More information about the gcc mailing list