Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86688
b: refs/heads/master
c: 976dde0
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Mar 3, 2008
1 parent f8dd06a commit 49507a7
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 121 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62e5c4b4d6351707346695fd9e151b6cda85cbe1
refs/heads/master: 976dde010e513a9c7c3117a32b7b015f84b37430
68 changes: 34 additions & 34 deletions trunk/drivers/acorn/char/defkeymap-l7200.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,40 +347,40 @@ char *func_table[MAX_NR_FUNC] = {
};

struct kbdiacruc accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
{'~', 'A', '\303'}, {'~', 'a', '\343'},
{'"', 'A', '\304'}, {'"', 'a', '\344'},
{'O', 'A', '\305'}, {'o', 'a', '\345'},
{'0', 'A', '\305'}, {'0', 'a', '\345'},
{'A', 'A', '\305'}, {'a', 'a', '\345'},
{'A', 'E', '\306'}, {'a', 'e', '\346'},
{',', 'C', '\307'}, {',', 'c', '\347'},
{'`', 'E', '\310'}, {'`', 'e', '\350'},
{'\'', 'E', '\311'}, {'\'', 'e', '\351'},
{'^', 'E', '\312'}, {'^', 'e', '\352'},
{'"', 'E', '\313'}, {'"', 'e', '\353'},
{'`', 'I', '\314'}, {'`', 'i', '\354'},
{'\'', 'I', '\315'}, {'\'', 'i', '\355'},
{'^', 'I', '\316'}, {'^', 'i', '\356'},
{'"', 'I', '\317'}, {'"', 'i', '\357'},
{'-', 'D', '\320'}, {'-', 'd', '\360'},
{'~', 'N', '\321'}, {'~', 'n', '\361'},
{'`', 'O', '\322'}, {'`', 'o', '\362'},
{'\'', 'O', '\323'}, {'\'', 'o', '\363'},
{'^', 'O', '\324'}, {'^', 'o', '\364'},
{'~', 'O', '\325'}, {'~', 'o', '\365'},
{'"', 'O', '\326'}, {'"', 'o', '\366'},
{'/', 'O', '\330'}, {'/', 'o', '\370'},
{'`', 'U', '\331'}, {'`', 'u', '\371'},
{'\'', 'U', '\332'}, {'\'', 'u', '\372'},
{'^', 'U', '\333'}, {'^', 'u', '\373'},
{'"', 'U', '\334'}, {'"', 'u', '\374'},
{'\'', 'Y', '\335'}, {'\'', 'y', '\375'},
{'T', 'H', '\336'}, {'t', 'h', '\376'},
{'s', 's', '\337'}, {'"', 'y', '\377'},
{'s', 'z', '\337'}, {'i', 'j', '\377'},
{'`', 'A', 0300}, {'`', 'a', 0340},
{'\'', 'A', 0301}, {'\'', 'a', 0341},
{'^', 'A', 0302}, {'^', 'a', 0342},
{'~', 'A', 0303}, {'~', 'a', 0343},
{'"', 'A', 0304}, {'"', 'a', 0344},
{'O', 'A', 0305}, {'o', 'a', 0345},
{'0', 'A', 0305}, {'0', 'a', 0345},
{'A', 'A', 0305}, {'a', 'a', 0345},
{'A', 'E', 0306}, {'a', 'e', 0346},
{',', 'C', 0307}, {',', 'c', 0347},
{'`', 'E', 0310}, {'`', 'e', 0350},
{'\'', 'E', 0311}, {'\'', 'e', 0351},
{'^', 'E', 0312}, {'^', 'e', 0352},
{'"', 'E', 0313}, {'"', 'e', 0353},
{'`', 'I', 0314}, {'`', 'i', 0354},
{'\'', 'I', 0315}, {'\'', 'i', 0355},
{'^', 'I', 0316}, {'^', 'i', 0356},
{'"', 'I', 0317}, {'"', 'i', 0357},
{'-', 'D', 0320}, {'-', 'd', 0360},
{'~', 'N', 0321}, {'~', 'n', 0361},
{'`', 'O', 0322}, {'`', 'o', 0362},
{'\'', 'O', 0323}, {'\'', 'o', 0363},
{'^', 'O', 0324}, {'^', 'o', 0364},
{'~', 'O', 0325}, {'~', 'o', 0365},
{'"', 'O', 0326}, {'"', 'o', 0366},
{'/', 'O', 0330}, {'/', 'o', 0370},
{'`', 'U', 0331}, {'`', 'u', 0371},
{'\'', 'U', 0332}, {'\'', 'u', 0372},
{'^', 'U', 0333}, {'^', 'u', 0373},
{'"', 'U', 0334}, {'"', 'u', 0374},
{'\'', 'Y', 0335}, {'\'', 'y', 0375},
{'T', 'H', 0336}, {'t', 'h', 0376},
{'s', 's', 0337}, {'"', 'y', 0377},
{'s', 'z', 0337}, {'i', 'j', 0377},
};

unsigned int accent_table_size = 68;
68 changes: 34 additions & 34 deletions trunk/drivers/char/defkeymap.c_shipped
Original file line number Diff line number Diff line change
Expand Up @@ -223,40 +223,40 @@ char *func_table[MAX_NR_FUNC] = {
};

struct kbdiacruc accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
{'~', 'A', '\303'}, {'~', 'a', '\343'},
{'"', 'A', '\304'}, {'"', 'a', '\344'},
{'O', 'A', '\305'}, {'o', 'a', '\345'},
{'0', 'A', '\305'}, {'0', 'a', '\345'},
{'A', 'A', '\305'}, {'a', 'a', '\345'},
{'A', 'E', '\306'}, {'a', 'e', '\346'},
{',', 'C', '\307'}, {',', 'c', '\347'},
{'`', 'E', '\310'}, {'`', 'e', '\350'},
{'\'', 'E', '\311'}, {'\'', 'e', '\351'},
{'^', 'E', '\312'}, {'^', 'e', '\352'},
{'"', 'E', '\313'}, {'"', 'e', '\353'},
{'`', 'I', '\314'}, {'`', 'i', '\354'},
{'\'', 'I', '\315'}, {'\'', 'i', '\355'},
{'^', 'I', '\316'}, {'^', 'i', '\356'},
{'"', 'I', '\317'}, {'"', 'i', '\357'},
{'-', 'D', '\320'}, {'-', 'd', '\360'},
{'~', 'N', '\321'}, {'~', 'n', '\361'},
{'`', 'O', '\322'}, {'`', 'o', '\362'},
{'\'', 'O', '\323'}, {'\'', 'o', '\363'},
{'^', 'O', '\324'}, {'^', 'o', '\364'},
{'~', 'O', '\325'}, {'~', 'o', '\365'},
{'"', 'O', '\326'}, {'"', 'o', '\366'},
{'/', 'O', '\330'}, {'/', 'o', '\370'},
{'`', 'U', '\331'}, {'`', 'u', '\371'},
{'\'', 'U', '\332'}, {'\'', 'u', '\372'},
{'^', 'U', '\333'}, {'^', 'u', '\373'},
{'"', 'U', '\334'}, {'"', 'u', '\374'},
{'\'', 'Y', '\335'}, {'\'', 'y', '\375'},
{'T', 'H', '\336'}, {'t', 'h', '\376'},
{'s', 's', '\337'}, {'"', 'y', '\377'},
{'s', 'z', '\337'}, {'i', 'j', '\377'},
{'`', 'A', 0300}, {'`', 'a', 0340},
{'\'', 'A', 0301}, {'\'', 'a', 0341},
{'^', 'A', 0302}, {'^', 'a', 0342},
{'~', 'A', 0303}, {'~', 'a', 0343},
{'"', 'A', 0304}, {'"', 'a', 0344},
{'O', 'A', 0305}, {'o', 'a', 0345},
{'0', 'A', 0305}, {'0', 'a', 0345},
{'A', 'A', 0305}, {'a', 'a', 0345},
{'A', 'E', 0306}, {'a', 'e', 0346},
{',', 'C', 0307}, {',', 'c', 0347},
{'`', 'E', 0310}, {'`', 'e', 0350},
{'\'', 'E', 0311}, {'\'', 'e', 0351},
{'^', 'E', 0312}, {'^', 'e', 0352},
{'"', 'E', 0313}, {'"', 'e', 0353},
{'`', 'I', 0314}, {'`', 'i', 0354},
{'\'', 'I', 0315}, {'\'', 'i', 0355},
{'^', 'I', 0316}, {'^', 'i', 0356},
{'"', 'I', 0317}, {'"', 'i', 0357},
{'-', 'D', 0320}, {'-', 'd', 0360},
{'~', 'N', 0321}, {'~', 'n', 0361},
{'`', 'O', 0322}, {'`', 'o', 0362},
{'\'', 'O', 0323}, {'\'', 'o', 0363},
{'^', 'O', 0324}, {'^', 'o', 0364},
{'~', 'O', 0325}, {'~', 'o', 0365},
{'"', 'O', 0326}, {'"', 'o', 0366},
{'/', 'O', 0330}, {'/', 'o', 0370},
{'`', 'U', 0331}, {'`', 'u', 0371},
{'\'', 'U', 0332}, {'\'', 'u', 0372},
{'^', 'U', 0333}, {'^', 'u', 0373},
{'"', 'U', 0334}, {'"', 'u', 0374},
{'\'', 'Y', 0335}, {'\'', 'y', 0375},
{'T', 'H', 0336}, {'t', 'h', 0376},
{'s', 's', 0337}, {'"', 'y', 0377},
{'s', 'z', 0337}, {'i', 'j', 0377},
};

unsigned int accent_table_size = 68;
4 changes: 2 additions & 2 deletions trunk/drivers/s390/char/defkeymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ char *func_table[MAX_NR_FUNC] = {
};

struct kbdiacruc accent_table[MAX_DIACR] = {
{'^', 'c', '\003'}, {'^', 'd', '\004'},
{'^', 'z', '\032'}, {'^', '\012', '\000'},
{'^', 'c', 0003}, {'^', 'd', 0004},
{'^', 'z', 0032}, {'^', 0012', 0000},
};

unsigned int accent_table_size = 4;
96 changes: 46 additions & 50 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,19 @@ struct pid *session_of_pgrp(struct pid *pgrp)
static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task)
{
struct task_struct *p;
int ret = 1;

do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p == ignored_task
|| p->exit_state
|| is_global_init(p->real_parent))
if ((p == ignored_task) ||
(p->exit_state && thread_group_empty(p)) ||
is_global_init(p->real_parent))
continue;

if (task_pgrp(p->real_parent) != pgrp &&
task_session(p->real_parent) == task_session(p)) {
ret = 0;
break;
}
task_session(p->real_parent) == task_session(p))
return 0;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return ret; /* (sighing) "Often!" */

return 1;
}

int is_current_pgrp_orphaned(void)
Expand Down Expand Up @@ -255,6 +254,37 @@ static int has_stopped_jobs(struct pid *pgrp)
return retval;
}

/*
* Check to see if any process groups have become orphaned as
* a result of our exiting, and if they have any stopped jobs,
* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void
kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
{
struct pid *pgrp = task_pgrp(tsk);
struct task_struct *ignored_task = tsk;

if (!parent)
/* exit: our father is in a different pgrp than
* we are and we were the only connection outside.
*/
parent = tsk->real_parent;
else
/* reparent: our child is in a different pgrp than
* we are, and it was the only connection outside.
*/
ignored_task = NULL;

if (task_pgrp(parent) != pgrp &&
task_session(parent) == task_session(tsk) &&
will_become_orphaned_pgrp(pgrp, ignored_task) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}

/**
* reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd
*
Expand Down Expand Up @@ -635,22 +665,7 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
p->exit_signal != -1 && thread_group_empty(p))
do_notify_parent(p, p->exit_signal);

/*
* process group orphan check
* Case ii: Our child is in a different pgrp
* than we are, and it was the only connection
* outside, so the child pgrp is now orphaned.
*/
if ((task_pgrp(p) != task_pgrp(father)) &&
(task_session(p) == task_session(father))) {
struct pid *pgrp = task_pgrp(p);

if (will_become_orphaned_pgrp(pgrp, NULL) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}
kill_orphaned_pgrp(p, father);
}

/*
Expand Down Expand Up @@ -735,11 +750,9 @@ 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;
struct task_struct *t;
struct pid *pgrp;

/*
* This does two things:
Expand All @@ -753,25 +766,8 @@ static void exit_notify(struct task_struct *tsk)
exit_task_namespaces(tsk);

write_lock_irq(&tasklist_lock);
/*
* Check to see if any process groups have become orphaned
* as a result of our exiting, and if they have any stopped
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*
* Case i: Our father is in a different pgrp than we are
* and we were the only connection outside, so our pgrp
* is about to become orphaned.
*/
t = tsk->real_parent;

pgrp = task_pgrp(tsk);
if ((task_pgrp(t) != pgrp) &&
(task_session(t) == task_session(tsk)) &&
will_become_orphaned_pgrp(pgrp, tsk) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL);

/* Let father know we died
*
Expand All @@ -788,8 +784,8 @@ static void exit_notify(struct task_struct *tsk)
* the same after a fork.
*/
if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 &&
( tsk->parent_exec_id != t->self_exec_id ||
tsk->self_exec_id != tsk->parent_exec_id)
(tsk->parent_exec_id != tsk->real_parent->self_exec_id ||
tsk->self_exec_id != tsk->parent_exec_id)
&& !capable(CAP_KILL))
tsk->exit_signal = SIGCHLD;

Expand Down Expand Up @@ -986,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;
Expand Down

0 comments on commit 49507a7

Please sign in to comment.