|Re: [AD] [AL] get_executable_name in xsystem.c|
[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
> run a program by typing "foo", and the executable would be the
> one in my path, not the random file called `foo' in the current
But this would not be a problem.
The only way you could execute a program called 'foo' in the current
directory is when the current directory is first in the path.
(or you could explicitly call ./foo, in which case argv would contain a /)
If this were a problem the 'which' program would not work.
So as long as we search the path in the correct order, there
should be no problem here.