summaryrefslogtreecommitdiff
path: root/bin/csh/func.c
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2017-07-26 19:15:10 +0000
committeranton <anton@cvs.openbsd.org>2017-07-26 19:15:10 +0000
commit0cde587c9d290fa9fb8f712b0c0c779332c320e9 (patch)
treea7e5ec9992987eb029b04a1be3c0ceca5353644c /bin/csh/func.c
parent06985a9763a8806457a1ea498f85fb6e15a262a5 (diff)
Postpone printing of prompt if filec is enabled in csh. Any I/O should be
performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests. Joint work with bluhm@, ok deraadt@
Diffstat (limited to 'bin/csh/func.c')
-rw-r--r--bin/csh/func.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/csh/func.c b/bin/csh/func.c
index 978cf0652ae..4ce579d09a6 100644
--- a/bin/csh/func.c
+++ b/bin/csh/func.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: func.c,v 1.33 2016/08/14 19:46:31 guenther Exp $ */
+/* $OpenBSD: func.c,v 1.34 2017/07/26 19:15:09 anton Exp $ */
/* $NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $ */
/*-
@@ -589,7 +589,7 @@ search(int type, int level, Char *goal)
bseek(&a);
}
do {
- if (intty && fseekp == feobp && aret == F_SEEK)
+ if (intty && !filec && fseekp == feobp && aret == F_SEEK)
(void) fprintf(cshout, "? "), (void) fflush(cshout);
aword[0] = 0;
(void) getword(aword);