um: take register_winch_irq() into the caller of is_skas_winch()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Al Viro 2011-08-18 20:08:19 +01:00 committed by Richard Weinberger
parent 0a9e70b1cd
commit 17e052093b
2 changed files with 7 additions and 6 deletions

View 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;

View File

@ -26,11 +26,7 @@
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)