Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / fs / binfmt_flat.c
index 7cd68c6..b31988e 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
@@ -511,7 +512,7 @@ static int load_flat_file(struct linux_binprm * bprm,
                }
 
                /* OK, This is the point of no return */
-               set_personality(PER_LINUX_32BIT);
+               set_personality(PER_LINUX);
        }
 
        /*
@@ -899,6 +900,9 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        
        start_thread(regs, start_addr, current->mm->start_stack);
 
+       if (current->ptrace & PT_PTRACED)
+               send_sig(SIGTRAP, current, 0);
+
        return 0;
 }