summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-01-07 10:05:35 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-01-07 10:05:35 +0000
commita89f0559c210def9a40bfeb9da6b38128a49cb55 (patch)
treeaa6bb2e44e5e7a842c4d78be3a71c6854b12b2ea /Src/builtin.c
parent21ee383e28f1e0fb31be0aa0c2d9a0cba26ccc8e (diff)
downloadzsh-a89f0559c210def9a40bfeb9da6b38128a49cb55.tar.gz
zsh-a89f0559c210def9a40bfeb9da6b38128a49cb55.zip
28590: make read return status non-zero on error
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c7
1 files changed, 6 insertions, 1 deletions
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;
}
/**/