From 1809aad33b83a35e1c55f9d2c19d62f4325e7e49 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Mon, 25 Jun 2012 21:46:07 -0700 Subject: [PATCH] (exit #t) exits successfully --- lib/chibi/process.scm | 10 ++++++++-- lib/chibi/process.stub | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/chibi/process.scm b/lib/chibi/process.scm index 4e332f82..349933d7 100644 --- a/lib/chibi/process.scm +++ b/lib/chibi/process.scm @@ -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 diff --git a/lib/chibi/process.stub b/lib/chibi/process.stub index d37e1b84..4793ffc0 100644 --- a/lib/chibi/process.stub +++ b/lib/chibi/process.stub @@ -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