From a89f0559c210def9a40bfeb9da6b38128a49cb55 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 7 Jan 2011 10:05:35 +0000 Subject: 28590: make read return status non-zero on error --- Src/builtin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 411b834e7..a85a49a20 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5710,7 +5710,12 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) } return 1; } - return 0; + /* + * The following is to ensure a failure to set the parameter + * causes a non-zero status return. There are arguments for + * turning a non-zero status into errflag more widely. + */ + return errflag; } /**/ -- cgit 1.4.1