mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-04 23:09:45 +01:00
+ added fppause() for FPC_USE_LIBC
* fixed test git-svn-id: trunk@13436 -
This commit is contained in:
parent
5127c74132
commit
ef1c033f49
@ -109,6 +109,7 @@ const
|
|||||||
Function FpFcntl (fildes : cInt; cmd : cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
|
Function FpFcntl (fildes : cInt; cmd : cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
|
||||||
Function FpFcntl (fildes : cInt; cmd : cInt; arg :cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
|
Function FpFcntl (fildes : cInt; cmd : cInt; arg :cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
|
||||||
Function FpFcntl (fildes : cInt; cmd : cInt; var arg : flock): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
|
Function FpFcntl (fildes : cInt; cmd : cInt; var arg : flock): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
|
||||||
|
Function FpAlarm (seconds : cuint) : cuint; cdecl;external clib name 'alarm';
|
||||||
Function FpPause : cInt; cdecl; external clib name 'pause';
|
Function FpPause : cInt; cdecl; external clib name 'pause';
|
||||||
Function FpMkfifo (path: pchar; mode: tmode): cint; cdecl; external clib name 'mkfifo';
|
Function FpMkfifo (path: pchar; mode: tmode): cint; cdecl; external clib name 'mkfifo';
|
||||||
{$ifdef solaris}
|
{$ifdef solaris}
|
||||||
|
|||||||
@ -15,10 +15,10 @@ begin
|
|||||||
Writeln('Setting alarm handler');
|
Writeln('Setting alarm handler');
|
||||||
fpSignal(SIGALRM,SignalHandler(@AlarmHandler));
|
fpSignal(SIGALRM,SignalHandler(@AlarmHandler));
|
||||||
Writeln ('Scheduling Alarm in 10 seconds');
|
Writeln ('Scheduling Alarm in 10 seconds');
|
||||||
fpAlarm(10);
|
fpAlarm(2);
|
||||||
Writeln ('Pausing');
|
Writeln ('Pausing');
|
||||||
fpPause;
|
fpPause;
|
||||||
if fpGetErrno<>0 then
|
if fpGetErrno<>ESysEINTR then
|
||||||
halt(1);
|
halt(1);
|
||||||
Writeln ('Pause returned');
|
Writeln ('Pause returned');
|
||||||
end.
|
end.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user