From 2941469f616202f51da7ba9ceafa3f419f34573b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 26 Mar 2003 18:55:22 +0000 Subject: 18392: read with -p and -t and no coprocess crashed. --- Src/builtin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/builtin.c b/Src/builtin.c index 3c07ee59a..4750e8d8b 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -4212,7 +4212,8 @@ bin_read(char *name, char **args, Options ops, int func) timeout = (zlong)mn.u.l * (zlong)1000000; } } - if (!read_poll(readfd, &readchar, keys && !zleactive, timeout)) { + if (readfd == -1 || + !read_poll(readfd, &readchar, keys && !zleactive, timeout)) { if (OPT_ISSET(ops,'k') && !zleactive && !isem) settyinfo(&shttyinfo); if (haso) { -- cgit v1.2.3