From 818aa89af2b791e3560c78d815dc37f36c7a65c0 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Mon, 16 Oct 2000 17:30:34 +0000 Subject: [PATCH] Do not open /dev/tty when in batch mode. --- code/fd-stream.lisp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/fd-stream.lisp b/code/fd-stream.lisp index 2448e1dcb..0c6683784 100644 --- a/code/fd-stream.lisp +++ b/code/fd-stream.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.53 2000/08/25 09:53:47 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.54 2000/10/16 17:30:34 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1470,12 +1470,13 @@ (make-fd-stream 1 :name "Standard Output" :output t :buffering :line)) (setf *stderr* (make-fd-stream 2 :name "Standard Error" :output t :buffering :line)) - (let ((tty (unix:unix-open "/dev/tty" unix:o_rdwr #o666))) - (if tty - (setf *tty* + (let ((tty (and (not *batch-mode*) + (unix:unix-open "/dev/tty" unix:o_rdwr #o666)))) + (setf *tty* + (if tty (make-fd-stream tty :name "the Terminal" :input t :output t - :buffering :line :auto-close t)) - (setf *tty* (make-two-way-stream *stdin* *stdout*)))) + :buffering :line :auto-close t) + (make-two-way-stream *stdin* *stdout*)))) nil) -- GitLab