mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-08 15:16:01 +02:00
* call libc's exit instead of _exit when doing a halt, so the
libc atexit handlers are called git-svn-id: trunk@6078 -
This commit is contained in:
parent
e78568ba69
commit
31fa4e78c9
@ -53,10 +53,21 @@ Implementation
|
|||||||
Misc. System Dependent Functions
|
Misc. System Dependent Functions
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
|
{$ifdef darwin}
|
||||||
|
procedure normalexit(status: cint); cdecl; external 'c' name 'exit';
|
||||||
|
{$endif}
|
||||||
|
|
||||||
procedure System_exit;
|
procedure System_exit;
|
||||||
|
{$ifndef darwin}
|
||||||
begin
|
begin
|
||||||
Fpexit(cint(ExitCode));
|
Fpexit(cint(ExitCode));
|
||||||
End;
|
end;
|
||||||
|
{$else darwin}
|
||||||
|
begin
|
||||||
|
{ make sure the libc atexit handlers are called, needed for e.g. profiling }
|
||||||
|
normalexit(cint(ExitCode));
|
||||||
|
end;
|
||||||
|
{$endif darwin}
|
||||||
|
|
||||||
|
|
||||||
Function ParamCount: Longint;
|
Function ParamCount: Longint;
|
||||||
|
Loading…
Reference in New Issue
Block a user