R
rh00667
hi all,
i'm confused now. how i can get the full path of an application?
if myapp is in a directory which belongs to PATH, argv[0] gives me the
first token of cmd line, and not the real path of the executed
program.
so if i write anywhere:
% myapp
it runs ok from the file (for example) /usr/local/bin/myapp
but argv[0] returns me
../myapp
but i need
/usr/local/bin/myapp
thanks in advance
i'm confused now. how i can get the full path of an application?
if myapp is in a directory which belongs to PATH, argv[0] gives me the
first token of cmd line, and not the real path of the executed
program.
so if i write anywhere:
% myapp
it runs ok from the file (for example) /usr/local/bin/myapp
but argv[0] returns me
../myapp
but i need
/usr/local/bin/myapp
thanks in advance