um: take register_winch_irq() into the caller of is_skas_winch()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 18 Aug 2011 19:08:19 +0000 (20:08 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 13:15:11 +0000 (14:15 +0100)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/chan_user.c
arch/um/os-Linux/skas/process.c

index 7ed06a7399d52ed0e60226d5b9e4ec2d9476457d..f180813ce2c7cb0caf950fa1d90852ab1f0ada55 100644 (file)
@@ -281,7 +281,12 @@ void register_winch(int fd, struct tty_struct *tty)
                return;
 
        pid = tcgetpgrp(fd);
-       if (!is_skas_winch(pid, fd, tty) && (pid == -1)) {
+       if (is_skas_winch(pid, fd, tty)) {
+               register_winch_irq(-1, fd, -1, tty, 0);
+               return;
+       }
+
+       if (pid == -1) {
                thread = winch_tramp(fd, tty, &thread_fd, &stack);
                if (thread < 0)
                        return;
index 30f1bb43a230ca05e0baf1a74d0d296dacdd2dd5..29e4ab7eb3695f648a9e686a4800e176db00de5a 100644 (file)
 
 int is_skas_winch(int pid, int fd, void *data)
 {
-       if (pid != getpgrp())
-               return 0;
-
-       register_winch_irq(-1, fd, -1, data, 0);
-       return 1;
+       return pid == getpgrp();
 }
 
 static int ptrace_dump_regs(int pid)