[[project @ 1997-07-29 07:12:27 by ghouston] ghouston**19970729071231 Ignore-this: e0afe69d50af93e1ffe75e799eb051c * Makefile.am (scsh_DATA): add newports.scm. * scsh.scm (exit): defined here instead of in syscalls.scm. ] hunk ./ChangeLog 3 + * Makefile.am (scsh_DATA): add newports.scm. + + * scsh.scm (exit): defined here instead of in syscalls.scm. + hunk ./Makefile.am 9 - network.scm rdelim.scm re.scm receive.scm \ + network.scm newports.scm rdelim.scm re.scm receive.scm \ hunk ./Makefile.in 67 - network.scm rdelim.scm re.scm receive.scm \ + network.scm newports.scm rdelim.scm re.scm receive.scm \ hunk ./scsh.scm 201 +(define (exit . maybe-status) + (flush-all-ports) + (primitive-exit (:optional maybe-status 0)) + (display "The evil undead walk the earth." 2) + (error "(exit) returned.")) + + +;;; The classic T 2.0 primitive. +;;; This definition works for procedures running on top of Unix systems. +(define (halts? proc) #t) + + +;;; Low-level init absolutely required for any scsh program. + +;;(define (init-scsh-hindbrain relink-ff?) +;; (if relink-ff? (lookup-all-externals)) ; Re-link C calls. +;; (init-fdports!) +;; (%install-unix-scsh-handlers)) + hunk ./scsh.scm 236 - - hunk ./syscalls.scm 6 -(set! exit primitive-exit) +;;; Process +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-foreign exit/errno ; errno -- misnomer. + (exit (integer status)) + ignore) + +(define-foreign %exit/errno ; errno -- misnomer + (_exit (integer status)) + ignore) + +;; (define (%exit . maybe-status) +;; (%exit/errno (:optional maybe-status 0)) +;; (error "Yikes! %exit returned.")) + + +(define-foreign %%fork/errno (fork) + (multi-rep (to-scheme pid_t errno_or_false) + pid_t))