How can I get full path of my executable file?


Is there any way to get full path where from my application was launched?
I tried use getenv("_"), but if programm was started by mqc (for example) getenv returns only the file_name w/o full path.
Or may be there is a way to resolve file descriptor to file_name?

Best regards, Sergo.

realpath( argv[0], buffer );