From eed560f56826299ad3e9acf18178a1d9fa9f242b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 9 Jan 2007 06:38:29 +0000 Subject: [PATCH] Set non-zero exit code if EOF reached inside error REPL. --- v7/src/runtime/ttyio.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/ttyio.scm b/v7/src/runtime/ttyio.scm index 44c928b95..6fde6f3b9 100644 --- a/v7/src/runtime/ttyio.scm +++ b/v7/src/runtime/ttyio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: ttyio.scm,v 1.26 2007/01/09 06:17:04 cph Exp $ +$Id: ttyio.scm,v 1.27 2007/01/09 06:38:29 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -109,7 +109,11 @@ USA. (begin (fresh-line port) (write-string "End of input stream reached." port))) - (%exit))) + (if (let ((condition (nearest-repl/condition))) + (and condition + (condition/error? condition))) + (%exit 1) + (%exit)))) char)) (define (operation/read-finish port) -- 2.25.1