]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/drivers/chan_user.c
uml: replace remaining __FUNCTION__ occurrences
[linux-2.6-omap-h63xx.git] / arch / um / drivers / chan_user.c
index b88e93b3a39f055a5b8a4a4d72b54ae8fe3ed5ee..025764089ac8ea7b739652c827fbe88b3a400324 100644 (file)
@@ -74,10 +74,16 @@ void generic_free(void *data)
 
 int generic_console_write(int fd, const char *buf, int n)
 {
+       sigset_t old, no_sigio;
        struct termios save, new;
        int err;
 
        if (isatty(fd)) {
+               sigemptyset(&no_sigio);
+               sigaddset(&no_sigio, SIGIO);
+               if (sigprocmask(SIG_BLOCK, &no_sigio, &old))
+                       goto error;
+
                CATCH_EINTR(err = tcgetattr(fd, &save));
                if (err)
                        goto error;
@@ -97,8 +103,11 @@ int generic_console_write(int fd, const char *buf, int n)
         * Restore raw mode, in any case; we *must* ignore any error apart
         * EINTR, except for debug.
         */
-       if (isatty(fd))
+       if (isatty(fd)) {
                CATCH_EINTR(tcsetattr(fd, TCSAFLUSH, &save));
+               sigprocmask(SIG_SETMASK, &old, NULL);
+       }
+
        return err;
 error:
        return -errno;