;; ;; The two-argument variants of process & process* signal an error ;; when "non-existant" can't be run, so the close-*-port forms are ;; never executed and the implicit process-wait that comes with ;; process* doesn't clean up the child. ;; ;; You must make sure the ports are closed somehow, ;; e.g. (not necessarily the best way): ;; (use posix spiffy) (define (server arg) (let-values (((i o e) (values #f #f #f))) (dynamic-wind void (lambda () (print "starting subprocess...") (let-values (((i* o* pid e*) (process* "non-existant"))) (set! i i*) (set! o o*) (set! e e*))) (lambda () (print "closing subprocess ports...") (close-input-port i) (close-input-port e) (close-output-port o) (send-status 'ok "done"))))) (access-log (current-output-port)) (error-log (current-error-port)) (debug-log (current-output-port)) (handle-not-found server) (root-path "./") (start-server)