This commit is contained in:
Ingy döt Net 2013-06-05 21:47:54 +00:00
parent 1f1ad49427
commit 6f050a029e
2496 changed files with 37609 additions and 3031 deletions

View file

@ -0,0 +1,15 @@
void
f1(integer a)
{
if (a) {
exit(1);
}
}
integer
main(void)
{
f1(3);
return 0;
}

View file

@ -0,0 +1,3 @@
% Implemented by Arjun Sunel
if problem ->
exit(1).

View file

@ -0,0 +1,3 @@
% Implemented by Arjun Sunel
if problem ->
halt().

View file

@ -0,0 +1,3 @@
#lang racket
(run-stuff)
(when (something-bad-happened) (exit 1))

View file

@ -0,0 +1,8 @@
#lang racket
(parameterize ([current-custodian (make-custodian)])
(define (loop) (printf "looping\n") (sleep 1) (loop))
(thread loop) ; start a thread under the new custodian
(sleep 5)
;; kill it: this will kill the thread, and any other opened resources
;; like file ports, network connections, etc
(custodian-shutdown-all (current-custodian)))