On linux, if I add a softlink to an executable:
When myprog is executed (really a softlink to a.out), argv[0] is the name of the softlink. This means a single, pre-compiled binary can respond to the name of the softlink via which it is invoked (which could be other than the actual name of the executable).Code:ln -s a.out myprog
I am almost positive this will be true on all other unix style filesystems, but I just wanted to check with anyone who might know for sure before I incorporate this potential into something that will be used cross-platform.



LinkBack URL
About LinkBacks



