tty: allow signals to break out of a tty write to a tty that is flow controlled
authorAlan Cox <alan@linux.intel.com>
Mon, 13 Nov 2017 01:32:47 +0000 (01:32 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 13 Nov 2017 01:32:47 +0000 (01:32 +0000)
Kernel/tty.c

index 46e7aef..24b9b6f 100644 (file)
@@ -509,6 +509,10 @@ uint8_t tty_putc_maywait(uint8_t minor, unsigned char c, uint8_t flag)
        */
        if (!udata.u_ininterrupt) {
                while ((t = tty_writeready(minor)) != TTY_READY_NOW) {
+                       if (chksigs()) {
+                               udata.u_error = EINTR;
+                               return 1;
+                       }
                        if (t == TTY_READY_LATER && flag) {
                                udata.u_error = EAGAIN;
                                return 1;