diff options
author | 2017-07-26 19:15:09 +0000 | |
---|---|---|
committer | 2017-07-26 19:15:09 +0000 | |
commit | fc253c1da959f2b9b44fae7dcf06027f7ad7c0de (patch) | |
tree | 590b8b8e13e5d8f36d2cdd101a5f72d3cfd9934e /bin/csh/csh.c | |
parent | Check the option length, not its address (which will never be NULL) (diff) | |
download | wireguard-openbsd-fc253c1da959f2b9b44fae7dcf06027f7ad7c0de.tar.xz wireguard-openbsd-fc253c1da959f2b9b44fae7dcf06027f7ad7c0de.zip |
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/csh.c')
-rw-r--r-- | bin/csh/csh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c index 08275b83bd7..517f11413b6 100644 --- a/bin/csh/csh.c +++ b/bin/csh/csh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.c,v 1.39 2016/03/19 15:42:38 krw Exp $ */ +/* $OpenBSD: csh.c,v 1.40 2017/07/26 19:15:09 anton Exp $ */ /* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */ /*- @@ -1008,7 +1008,7 @@ process(bool catch) * read fresh stuff. Otherwise, we are rereading input and don't * need or want to prompt. */ - if (aret == F_SEEK && fseekp == feobp) + if (!filec && aret == F_SEEK && fseekp == feobp) printprompt(); (void) fflush(cshout); } |