mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
(exit #t) exits successfully
This commit is contained in:
parent
02d02f40be
commit
1809aad33b
2 changed files with 9 additions and 3 deletions
|
@ -2,10 +2,16 @@
|
|||
(cond-expand
|
||||
(plan9
|
||||
(define (exit . o)
|
||||
(%exit (if (pair? o) (if (string? (car o)) (car o) "error") ""))))
|
||||
(%exit (if (pair? o)
|
||||
(if (string? (car o))
|
||||
(car o)
|
||||
(if (eq? #t (car o)) "" "chibi error"))
|
||||
""))))
|
||||
(else
|
||||
(define (exit . o)
|
||||
(%exit (if (pair? o) (if (integer? (car o)) (car o) 1) 0)))))
|
||||
(%exit (if (pair? o)
|
||||
(if (integer? (car o)) (car o) (if (eq? #t (car o)) 0 1))
|
||||
0)))))
|
||||
|
||||
(cond-expand
|
||||
(bsd
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
;;> Exits the current process immediately. Finalizers are not run.
|
||||
|
||||
(cond-expand
|
||||
(plan9 (define-c void (%exit exit) (string)))
|
||||
(plan9 (define-c void (%exit exits) (string)))
|
||||
(else (define-c void (%exit exit) (int))))
|
||||
|
||||
;;> Replace the current process with the given command. Finalizers
|
||||
|
|
Loading…
Add table
Reference in a new issue