mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-16 16:06:03 +02:00
* Use /proc/self/exe instead of /proc/[getpid]/exe
This commit is contained in:
parent
9b08a42919
commit
178f87f437
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user