From e7ef07b5576875d475686bf0c37dc4564655fa6c Mon Sep 17 00:00:00 2001 From: Theodore Dubois Date: Fri, 11 Jan 2019 14:57:51 -0800 Subject: [PATCH] Revert "Temporary hack to fix ctrl-c not interrupting read()" This reverts commit a79d17fde6947bde02aa9d6dfe747b530f79fe5e. --- fs/tty.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/tty.c b/fs/tty.c index 422c4d18..12007704 100644 --- a/fs/tty.c +++ b/fs/tty.c @@ -169,9 +169,7 @@ static bool tty_send_input_signal(struct tty *tty, char ch) { if (tty->fg_group != 0) { if (!(tty->termios.lflags & NOFLSH_)) tty->bufsize = 0; - unlock(&tty->lock); send_group_signal(tty->fg_group, sig); - lock(&tty->lock); } return true; } @@ -502,11 +500,8 @@ static int tty_ioctl(struct fd *fd, int cmd, void *arg) { void tty_set_winsize(struct tty *tty, struct winsize_ winsize) { tty->winsize = winsize; - if (tty->fg_group != 0) { - unlock(&tty->lock); + if (tty->fg_group != 0) send_group_signal(tty->fg_group, SIGWINCH_); - lock(&tty->lock); - } } struct dev_ops tty_dev = {