浏览代码

* Use /proc/self/exe instead of /proc/[getpid]/exe

daniel 21 年之前
父节点
当前提交
178f87f437
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      rtl/linux/system.pp

+ 5 - 4
rtl/linux/system.pp

@@ -150,9 +150,7 @@ var
   link : string;
   i    : longint;
 begin
-  str(Fpgetpid,hs);
-  hs:='/proc/'+hs+'/exe'#0;
-  i:=Fpreadlink(@hs[1],@link[1],high(link));
+  i:=Fpreadlink('/proc/self/exe',@link[1],high(link));
   { it must also be an absolute filename, linux 2.0 points to a memory
     location so this will skip that }
   if (i>0) and (link[1]='/') then
@@ -190,7 +188,10 @@ End.
 
 {
   $Log$
-  Revision 1.15  2004-06-17 16:16:13  peter
+  Revision 1.16  2004-07-08 19:45:42  daniel
+    * Use /proc/self/exe instead of /proc/[getpid]/exe
+
+  Revision 1.15  2004/06/17 16:16:13  peter
     * New heapmanager that releases memory back to the OS, donated
       by Micha Nelissen