]> err.no Git - linux-2.6/blobdiff - kernel/exit.c
V4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to it
[linux-2.6] / kernel / exit.c
index 41c1edace97a34fc44d5725ed4544ad07bf33dd5..53872bf993fa79d46b6e252db4f393c6a3e6828f 100644 (file)
@@ -750,7 +750,7 @@ static void forget_original_parent(struct task_struct *father)
  * Send signals to all our closest relatives so that they know
  * to properly mourn us..
  */
-static void exit_notify(struct task_struct *tsk)
+static void exit_notify(struct task_struct *tsk, int group_dead)
 {
        int state;
 
@@ -766,7 +766,8 @@ static void exit_notify(struct task_struct *tsk)
        exit_task_namespaces(tsk);
 
        write_lock_irq(&tasklist_lock);
-       kill_orphaned_pgrp(tsk, NULL);
+       if (group_dead)
+               kill_orphaned_pgrp(tsk->group_leader, NULL);
 
        /* Let father know we died
         *
@@ -981,7 +982,7 @@ NORET_TYPE void do_exit(long code)
                module_put(tsk->binfmt->module);
 
        proc_exit_connector(tsk);
-       exit_notify(tsk);
+       exit_notify(tsk, group_dead);
 #ifdef CONFIG_NUMA
        mpol_free(tsk->mempolicy);
        tsk->mempolicy = NULL;
@@ -1377,7 +1378,7 @@ unlock_sig:
        if (!retval && infop)
                retval = put_user(0, &infop->si_errno);
        if (!retval && infop)
-               retval = put_user(why, &infop->si_code);
+               retval = put_user((short)why, &infop->si_code);
        if (!retval && infop)
                retval = put_user(exit_code, &infop->si_status);
        if (!retval && infop)