This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/clib/testrlimit.pl
Vítor Santos Costa 40febfdf9b clib package
2010-06-17 00:40:25 +01:00

9 lines
163 B
Prolog

test :-
rlimit(cpu, _, 2),
on_signal(xcpu, _, cpu_exceeded),
( repeat, fail ).
cpu_exceeded(_Sig) :-
format(user_error, 'CPU time exceeded~n', []),
halt(1).