There is a subtle difference between ParamStr(0) and argv[0]:

  argv[0] is the verbatim command passed to the shell.
  ParamStr(0) is the full path to the executable.

Neither of these will dereference a symlink, to do that you
can call ReadLink recursively, or ReadLink(/proc/<PID>/exe)


Also note that the argv's are zero-based pchar's,
the paramstr's are one-based pascal strings.


The argv's are also writeable:

 This works:
   argv[0][1]:='x';

 But this doesn't:
   ParamStr(0)[1]:='x';



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to