From a0af57c0b2635fe7add86af8dd9f022f5ba90588 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 8 Jan 2007 00:46:04 +0000 Subject: [PATCH] warn if did not get a terminal input svn: r5253 --- collects/readline/mzrl.ss | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/collects/readline/mzrl.ss b/collects/readline/mzrl.ss index 3db3f93c8c..8c07f7f522 100644 --- a/collects/readline/mzrl.ss +++ b/collects/readline/mzrl.ss @@ -46,9 +46,12 @@ ;; need to capture the real input port below (define real-input-port (current-input-port)) -(unless (eq? 'stdin (object-name (current-input-port))) - (fprintf (current-output-port) - "mzrl warning: could not capture the real input port")) +(unless (eq? 'stdin (object-name real-input-port)) + (fprintf (current-error-port) + "mzrl warning: could not capture the real input port\n")) +(unless (terminal-port? real-input-port) + (fprintf (current-error-port) + "mzrl warning: input port is not a terminal\n")) ;; make it possible to run Scheme threads while waiting for input (set-ffi-obj! "rl_event_hook" libreadline (_fun -> _int)