Merge branch 'upstream'
[pandora-kernel.git] / arch / um / os-Linux / tt.c
index a6db887..cb2648b 100644 (file)
@@ -23,7 +23,6 @@
 #include "kern_util.h"
 #include "user.h"
 #include "signal_kern.h"
-#include "signal_user.h"
 #include "sysdep/ptrace.h"
 #include "sysdep/sigcontext.h"
 #include "irq_user.h"
@@ -50,6 +49,20 @@ int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x,
        return(0);
 }
 
+void kill_child_dead(int pid)
+{
+       kill(pid, SIGKILL);
+       kill(pid, SIGCONT);
+       do {
+               int n;
+               CATCH_EINTR(n = waitpid(pid, NULL, 0));
+               if (n > 0)
+                       kill(pid, SIGCONT);
+               else
+                       break;
+       } while(1);
+}
+
 /*
  *-------------------------
  * only for tt mode (will be deleted in future...)