fs: move dcache sysctls to its own file
[linux-2.6-block.git] / kernel / exit.c
index 64e907bc87d5ca056dafbd16f6cffd50549ae690..b00a25bb4ab939fb54e29785f9365c01c1447080 100644 (file)
@@ -911,8 +911,6 @@ do_group_exit(int exit_code)
 {
        struct signal_struct *sig = current->signal;
 
-       BUG_ON(exit_code & 0x80); /* core dumps don't get here */
-
        if (sig->flags & SIGNAL_GROUP_EXIT)
                exit_code = sig->group_exit_code;
        else if (sig->group_exec_task)
@@ -1020,7 +1018,8 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
                return 0;
 
        if (unlikely(wo->wo_flags & WNOWAIT)) {
-               status = p->exit_code;
+               status = (p->signal->flags & SIGNAL_GROUP_EXIT)
+                       ? p->signal->group_exit_code : p->exit_code;
                get_task_struct(p);
                read_unlock(&tasklist_lock);
                sched_annotate_sleep();