(exit #t) exits successfully

This commit is contained in:
Alex Shinn 2012-06-25 21:46:07 -07:00
parent 02d02f40be
commit 1809aad33b
2 changed files with 9 additions and 3 deletions

View file

@ -2,10 +2,16 @@
(cond-expand (cond-expand
(plan9 (plan9
(define (exit . o) (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 (else
(define (exit . o) (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 (cond-expand
(bsd (bsd

View file

@ -118,7 +118,7 @@
;;> Exits the current process immediately. Finalizers are not run. ;;> Exits the current process immediately. Finalizers are not run.
(cond-expand (cond-expand
(plan9 (define-c void (%exit exit) (string))) (plan9 (define-c void (%exit exits) (string)))
(else (define-c void (%exit exit) (int)))) (else (define-c void (%exit exit) (int))))
;;> Replace the current process with the given command. Finalizers ;;> Replace the current process with the given command. Finalizers