summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranton <anton@openbsd.org>2017-07-18 17:24:42 +0000
committeranton <anton@openbsd.org>2017-07-18 17:24:42 +0000
commitd8e3aed7b9d8629becceb3db7501a27697b78594 (patch)
tree12d49a7a5d047ec44a1b5c4f6ae1b9ac2b3c2589
parentStop automatically regenerating gap.o (and hence linking a new kernel) (diff)
downloadwireguard-openbsd-d8e3aed7b9d8629becceb3db7501a27697b78594.tar.xz
wireguard-openbsd-d8e3aed7b9d8629becceb3db7501a27697b78594.zip
Restore tty when aborting loop.
ok deraadt@
-rw-r--r--bin/csh/file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/csh/file.c b/bin/csh/file.c
index 638c6deda3f..7fb1f95d5cb 100644
--- a/bin/csh/file.c
+++ b/bin/csh/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.30 2017/06/29 04:23:12 deraadt Exp $ */
+/* $OpenBSD: file.c,v 1.31 2017/07/18 17:24:42 anton Exp $ */
/* $NetBSD: file.c,v 1.11 1996/11/08 19:34:37 christos Exp $ */
/*-
@@ -228,8 +228,10 @@ cl_abort(struct cmdline *cl, int c)
cl_visc(cl, c);
/* Abort while/foreach loop prematurely. */
- if (whyles)
+ if (whyles) {
+ setup_tty(0);
kill(getpid(), SIGINT);
+ }
cl_putc(cl, '\n');
cl->len = cl->cursor = 0;