vserver 1.9.3
[linux-2.6.git] / arch / um / kernel / trap_user.c
index 63812e5..d12eac6 100644 (file)
@@ -5,11 +5,9 @@
 
 #include <stdlib.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <setjmp.h>
 #include <signal.h>
 #include <sys/time.h>
-#include <sys/ioctl.h>
 #include <sys/ptrace.h>
 #include <sys/wait.h>
 #include <asm/page.h>
@@ -34,7 +32,14 @@ void kill_child_dead(int pid)
 {
        kill(pid, SIGKILL);
        kill(pid, SIGCONT);
-       while(waitpid(pid, NULL, 0) > 0) kill(pid, SIGCONT);
+       do {
+               int n;
+               CATCH_EINTR(n = waitpid(pid, NULL, 0));
+               if (n > 0)
+                       kill(pid, SIGCONT);
+               else
+                       break;
+       } while(1);
 }
 
 /* Unlocked - don't care if this is a bit off */
@@ -82,6 +87,8 @@ struct signal_info sig_info[] = {
                     .is_irq            = 0 },
        [ SIGILL ] { .handler           = relay_signal,
                     .is_irq            = 0 },
+       [ SIGWINCH ] { .handler         = winch,
+                      .is_irq          = 1 },
        [ SIGBUS ] { .handler           = bus_handler,
                     .is_irq            = 0 },
        [ SIGSEGV] { .handler           = segv_handler,
@@ -102,12 +109,11 @@ void sig_handler(int sig, struct sigcontext sc)
                         sig, &sc);
 }
 
-extern int timer_irq_inited, missed_ticks[];
+extern int timer_irq_inited;
 
 void alarm_handler(int sig, struct sigcontext sc)
 {
        if(!timer_irq_inited) return;
-       missed_ticks[cpu()]++;
 
        if(sig == SIGALRM)
                switch_timers(0);
@@ -121,9 +127,9 @@ void alarm_handler(int sig, struct sigcontext sc)
 
 void do_longjmp(void *b, int val)
 {
-       jmp_buf *buf = b;
+       sigjmp_buf *buf = b;
 
-       longjmp(*buf, val);
+       siglongjmp(*buf, val);
 }
 
 /*