Commits

evhan committed 899ca1b

Initial

Comments (0)

Files changed (5)

+chicken-sysexits
+================
+`sysexits(3)` values (preferable exit codes) for CHICKEN.
+
+API
+---
+After `(use sysexits)`, the following integer values will be defined:
+
+    exit/ok          ; successful termination
+    exit/usage       ; command line usage error
+    exit/dataerr     ; data format error
+    exit/noinput     ; cannot open input
+    exit/nouser      ; addressee unknown
+    exit/nohost      ; host name unknown
+    exit/unavailable ; service unavailable
+    exit/software    ; internal software error
+    exit/oserr       ; system error (e.g., can't fork)
+    exit/osfile      ; critical OS file missing
+    exit/cantcreat   ; can't create (user) output file
+    exit/ioerr       ; input/output error
+    exit/tempfail    ; temp failure; user is invited to retry
+    exit/protocol    ; remote error in protocol
+    exit/noperm      ; permission denied
+    exit/config      ; configuration error
+
+Author
+------
+Evan Hanson <evhan@foldling.org>
+
+License
+-------
+Public Domain
+((synopsis "Preferable exit codes")
+ (author "Evan Hanson")
+ (license "Public Domain")
+ (category os))

sysexits.release-info

+(repo git "git://bitbucket.org/evhan/chicken-{egg-name}.git")
+(uri targz "http://bitbucket.org/evhan/chicken-{egg-name}/get/{egg-release}.tar.gz")
+(release "0.1.0")
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; sysexits(3) values (preferable exit codes) for CHICKEN.
+;;;
+;;; This software is written by Evan Hanson <evhan@foldling.org> and
+;;; placed in the Public Domain. All warranties are disclaimed.
+;;;
+
+(module sysexits *
+  (import scheme foreign)
+  (foreign-declare "#include <sysexits.h>")
+  (define exit/ok (foreign-value "EX_OK" int)) ; successful termination
+  (define exit/usage (foreign-value "EX_USAGE" int)) ; command line usage error
+  (define exit/dataerr (foreign-value "EX_DATAERR" int)) ; data format error
+  (define exit/noinput (foreign-value "EX_NOINPUT" int)) ; cannot open input
+  (define exit/nouser (foreign-value "EX_NOUSER" int)) ; addressee unknown
+  (define exit/nohost (foreign-value "EX_NOHOST" int)) ; host name unknown
+  (define exit/unavailable (foreign-value "EX_UNAVAILABLE" int)) ; service unavailable
+  (define exit/software (foreign-value "EX_SOFTWARE" int)) ; internal software error
+  (define exit/oserr (foreign-value "EX_OSERR" int)) ; system error (e.g., can't fork)
+  (define exit/osfile (foreign-value "EX_OSFILE" int)) ; critical OS file missing
+  (define exit/cantcreat (foreign-value "EX_CANTCREAT" int)) ; can't create (user) output file
+  (define exit/ioerr (foreign-value "EX_IOERR" int)) ; input/output error
+  (define exit/tempfail (foreign-value "EX_TEMPFAIL" int)) ; temp failure; user is invited to retry
+  (define exit/protocol (foreign-value "EX_PROTOCOL" int)) ; remote error in protocol
+  (define exit/noperm (foreign-value "EX_NOPERM" int)) ; permission denied
+  (define exit/config (foreign-value "EX_CONFIG" int))) ; configuration error
+(compile -d0 -O3 -sJ sysexits.scm)
+(compile -d0 -O3 -cs -unit sysexits sysexits.scm)
+(compile -d0 -O3 -s sysexits.import.scm)
+(install-extension 'sysexits
+ '("sysexits.so" "sysexits.import.so" "sysexits.o")
+ '((version "0.1.0")))