X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/03b75b4c964d8b3ac97d4007f0e033549b01c92f..d7911799068d97efe3695e4097c9ab188b54218c:/unitfork.pas diff --git a/unitfork.pas b/unitfork.pas index 019695b..9e8503f 100644 --- a/unitfork.pas +++ b/unitfork.pas @@ -3,7 +3,9 @@ which is included in the package ----------------------------------------------------------------------------- } unit unitfork; - +{$ifdef fpc} + {$mode delphi} +{$endif} interface procedure dofork(const programname:string); @@ -63,7 +65,11 @@ begin if ioresult <> 0 then exit; end; + {$IF FPC_FULLVERSION>=20602} + handle := getfilehandle(pidfile); + {$else} handle := getfs(pidfile); + {$endif} //debugout('got handle'); {check if locking is possible: it's not if other process still runs}