X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/2d2676149292e4e388bb102a41a3d64349ac88ed..d7911799068d97efe3695e4097c9ab188b54218c:/unitfork.pas diff --git a/unitfork.pas b/unitfork.pas old mode 100755 new mode 100644 index 019695b..9e8503f --- 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}