mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-21 07:01:51 +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;
|
link : string;
|
||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
str(Fpgetpid,hs);
|
i:=Fpreadlink('/proc/self/exe',@link[1],high(link));
|
||||||
hs:='/proc/'+hs+'/exe'#0;
|
|
||||||
i:=Fpreadlink(@hs[1],@link[1],high(link));
|
|
||||||
{ it must also be an absolute filename, linux 2.0 points to a memory
|
{ it must also be an absolute filename, linux 2.0 points to a memory
|
||||||
location so this will skip that }
|
location so this will skip that }
|
||||||
if (i>0) and (link[1]='/') then
|
if (i>0) and (link[1]='/') then
|
||||||
@ -190,7 +188,10 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* New heapmanager that releases memory back to the OS, donated
|
||||||
by Micha Nelissen
|
by Micha Nelissen
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user