Welcome to the CHICKEN Scheme pasting service

make csi close open ports on exit added by C-Keen on Wed Apr 18 14:46:04 2012

commit 8c11a6203be64379ea15b5f89f0181990e3095d1
Author: Christian Kellermann <ckeen@pestilenz.org>
Date:   Wed Apr 18 13:28:58 2012 +0200

    make csi close stdin/stderr/stdout when exiting.

diff --git a/csi.scm b/csi.scm
index de17b74..7cf9107 100644
--- a/csi.scm
+++ b/csi.scm
@@ -1091,7 +1091,10 @@ EOF
              (lambda (k)
                (set! ##sys#quit-hook (lambda _ (k #f)))
                (repl csi-eval)))
-            (##sys#write-char-0 #\newline ##sys#standard-output) ) )
+            (##sys#write-char-0 #\newline ##sys#standard-output)
+            (close-input-port (current-input-port))
+            (close-output-port (current-output-port))
+            (close-output-port (current-error-port)) ) )
        (let* ((arg (car args)))
          (cond ((member arg simple-options))
                ((member arg complex-options)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `process-wait'?
Visually impaired? Let me spell it for you (wav file) download WAV