In article <1cf855ae-1ff2-4c10-a917->,
fl <> wrote:
>Although it can run with the './' prefix, I want to know the reason
>for this new requirement. Thanks.
I don't think this has anything to do with the C language in particular;
write a python program and see if the same thing doesn't happen.
When you execute a program by name only, the system searches for the
program in the directories listed in $PATH. If not found, then the
program won't be executed.
If you specify the program to execute by explicit path, e.g. "./foo"
instead of "foo", then the system will execute the program from the
location you specified instead of searching for it.
If your $PATH contains "." then the system will also search your current
directory for the program and your program goes away.
However, putting "." in your path is discouraged for security reasons.
--
-Ed Falk,
http://thespamdiaries.blogspot.com/