fix case in which we can fail to exit the repl cleanly
authorAndy Wingo <wingo@pobox.com>
Thu, 18 Sep 2008 18:05:23 +0000 (20:05 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 18 Sep 2008 18:05:23 +0000 (20:05 +0200)
* module/system/repl/repl.scm (next-char): Don't throw if we get an EOF,
  just return the EOF object. Fixes a case in which we fail to exit
  cleanly.

module/system/repl/repl.scm

index f9d17cd..69a47f3 100644 (file)
 (define (next-char wait)
   (if (or wait (char-ready?))
       (let ((ch (peek-char)))
-       (cond ((eof-object? ch) (newline) (throw 'quit))
+       (cond ((eof-object? ch) ch)
              ((char-whitespace? ch) (read-char) (next-char wait))
              (else ch)))
       #f))