diff --git a/lib/chibi/process.scm b/lib/chibi/process.scm index b4221824..4e332f82 100644 --- a/lib/chibi/process.scm +++ b/lib/chibi/process.scm @@ -1,4 +1,12 @@ +(cond-expand + (plan9 + (define (exit . o) + (%exit (if (pair? o) (if (string? (car o)) (car o) "error") "")))) + (else + (define (exit . o) + (%exit (if (pair? o) (if (integer? (car o)) (car o) 1) 0))))) + (cond-expand (bsd (define (process-command-line pid) diff --git a/lib/chibi/process.stub b/lib/chibi/process.stub index fca6db84..d37e1b84 100644 --- a/lib/chibi/process.stub +++ b/lib/chibi/process.stub @@ -117,7 +117,9 @@ ;;> Exits the current process immediately. Finalizers are not run. -(define-c void exit (int)) +(cond-expand + (plan9 (define-c void (%exit exit) (string))) + (else (define-c void (%exit exit) (int)))) ;;> Replace the current process with the given command. Finalizers ;;> are not run.