diff options
-rw-r--r-- | drivers/acorn/char/defkeymap-l7200.c | 68 | ||||
-rw-r--r-- | drivers/char/defkeymap.c_shipped | 68 | ||||
-rw-r--r-- | drivers/s390/char/defkeymap.c | 4 | ||||
-rw-r--r-- | kernel/exit.c | 96 |
4 files changed, 116 insertions, 120 deletions
diff --git a/drivers/acorn/char/defkeymap-l7200.c b/drivers/acorn/char/defkeymap-l7200.c index 28a5fbc6aa1a..93d80a1c36f9 100644 --- a/drivers/acorn/char/defkeymap-l7200.c +++ b/drivers/acorn/char/defkeymap-l7200.c | |||
@@ -347,40 +347,40 @@ char *func_table[MAX_NR_FUNC] = { | |||
347 | }; | 347 | }; |
348 | 348 | ||
349 | struct kbdiacruc accent_table[MAX_DIACR] = { | 349 | struct kbdiacruc accent_table[MAX_DIACR] = { |
350 | {'`', 'A', '\300'}, {'`', 'a', '\340'}, | 350 | {'`', 'A', 0300}, {'`', 'a', 0340}, |
351 | {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, | 351 | {'\'', 'A', 0301}, {'\'', 'a', 0341}, |
352 | {'^', 'A', '\302'}, {'^', 'a', '\342'}, | 352 | {'^', 'A', 0302}, {'^', 'a', 0342}, |
353 | {'~', 'A', '\303'}, {'~', 'a', '\343'}, | 353 | {'~', 'A', 0303}, {'~', 'a', 0343}, |
354 | {'"', 'A', '\304'}, {'"', 'a', '\344'}, | 354 | {'"', 'A', 0304}, {'"', 'a', 0344}, |
355 | {'O', 'A', '\305'}, {'o', 'a', '\345'}, | 355 | {'O', 'A', 0305}, {'o', 'a', 0345}, |
356 | {'0', 'A', '\305'}, {'0', 'a', '\345'}, | 356 | {'0', 'A', 0305}, {'0', 'a', 0345}, |
357 | {'A', 'A', '\305'}, {'a', 'a', '\345'}, | 357 | {'A', 'A', 0305}, {'a', 'a', 0345}, |
358 | {'A', 'E', '\306'}, {'a', 'e', '\346'}, | 358 | {'A', 'E', 0306}, {'a', 'e', 0346}, |
359 | {',', 'C', '\307'}, {',', 'c', '\347'}, | 359 | {',', 'C', 0307}, {',', 'c', 0347}, |
360 | {'`', 'E', '\310'}, {'`', 'e', '\350'}, | 360 | {'`', 'E', 0310}, {'`', 'e', 0350}, |
361 | {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, | 361 | {'\'', 'E', 0311}, {'\'', 'e', 0351}, |
362 | {'^', 'E', '\312'}, {'^', 'e', '\352'}, | 362 | {'^', 'E', 0312}, {'^', 'e', 0352}, |
363 | {'"', 'E', '\313'}, {'"', 'e', '\353'}, | 363 | {'"', 'E', 0313}, {'"', 'e', 0353}, |
364 | {'`', 'I', '\314'}, {'`', 'i', '\354'}, | 364 | {'`', 'I', 0314}, {'`', 'i', 0354}, |
365 | {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, | 365 | {'\'', 'I', 0315}, {'\'', 'i', 0355}, |
366 | {'^', 'I', '\316'}, {'^', 'i', '\356'}, | 366 | {'^', 'I', 0316}, {'^', 'i', 0356}, |
367 | {'"', 'I', '\317'}, {'"', 'i', '\357'}, | 367 | {'"', 'I', 0317}, {'"', 'i', 0357}, |
368 | {'-', 'D', '\320'}, {'-', 'd', '\360'}, | 368 | {'-', 'D', 0320}, {'-', 'd', 0360}, |
369 | {'~', 'N', '\321'}, {'~', 'n', '\361'}, | 369 | {'~', 'N', 0321}, {'~', 'n', 0361}, |
370 | {'`', 'O', '\322'}, {'`', 'o', '\362'}, | 370 | {'`', 'O', 0322}, {'`', 'o', 0362}, |
371 | {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, | 371 | {'\'', 'O', 0323}, {'\'', 'o', 0363}, |
372 | {'^', 'O', '\324'}, {'^', 'o', '\364'}, | 372 | {'^', 'O', 0324}, {'^', 'o', 0364}, |
373 | {'~', 'O', '\325'}, {'~', 'o', '\365'}, | 373 | {'~', 'O', 0325}, {'~', 'o', 0365}, |
374 | {'"', 'O', '\326'}, {'"', 'o', '\366'}, | 374 | {'"', 'O', 0326}, {'"', 'o', 0366}, |
375 | {'/', 'O', '\330'}, {'/', 'o', '\370'}, | 375 | {'/', 'O', 0330}, {'/', 'o', 0370}, |
376 | {'`', 'U', '\331'}, {'`', 'u', '\371'}, | 376 | {'`', 'U', 0331}, {'`', 'u', 0371}, |
377 | {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, | 377 | {'\'', 'U', 0332}, {'\'', 'u', 0372}, |
378 | {'^', 'U', '\333'}, {'^', 'u', '\373'}, | 378 | {'^', 'U', 0333}, {'^', 'u', 0373}, |
379 | {'"', 'U', '\334'}, {'"', 'u', '\374'}, | 379 | {'"', 'U', 0334}, {'"', 'u', 0374}, |
380 | {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, | 380 | {'\'', 'Y', 0335}, {'\'', 'y', 0375}, |
381 | {'T', 'H', '\336'}, {'t', 'h', '\376'}, | 381 | {'T', 'H', 0336}, {'t', 'h', 0376}, |
382 | {'s', 's', '\337'}, {'"', 'y', '\377'}, | 382 | {'s', 's', 0337}, {'"', 'y', 0377}, |
383 | {'s', 'z', '\337'}, {'i', 'j', '\377'}, | 383 | {'s', 'z', 0337}, {'i', 'j', 0377}, |
384 | }; | 384 | }; |
385 | 385 | ||
386 | unsigned int accent_table_size = 68; | 386 | unsigned int accent_table_size = 68; |
diff --git a/drivers/char/defkeymap.c_shipped b/drivers/char/defkeymap.c_shipped index 0aa419a61767..d2208dfe3f67 100644 --- a/drivers/char/defkeymap.c_shipped +++ b/drivers/char/defkeymap.c_shipped | |||
@@ -223,40 +223,40 @@ char *func_table[MAX_NR_FUNC] = { | |||
223 | }; | 223 | }; |
224 | 224 | ||
225 | struct kbdiacruc accent_table[MAX_DIACR] = { | 225 | struct kbdiacruc accent_table[MAX_DIACR] = { |
226 | {'`', 'A', '\300'}, {'`', 'a', '\340'}, | 226 | {'`', 'A', 0300}, {'`', 'a', 0340}, |
227 | {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, | 227 | {'\'', 'A', 0301}, {'\'', 'a', 0341}, |
228 | {'^', 'A', '\302'}, {'^', 'a', '\342'}, | 228 | {'^', 'A', 0302}, {'^', 'a', 0342}, |
229 | {'~', 'A', '\303'}, {'~', 'a', '\343'}, | 229 | {'~', 'A', 0303}, {'~', 'a', 0343}, |
230 | {'"', 'A', '\304'}, {'"', 'a', '\344'}, | 230 | {'"', 'A', 0304}, {'"', 'a', 0344}, |
231 | {'O', 'A', '\305'}, {'o', 'a', '\345'}, | 231 | {'O', 'A', 0305}, {'o', 'a', 0345}, |
232 | {'0', 'A', '\305'}, {'0', 'a', '\345'}, | 232 | {'0', 'A', 0305}, {'0', 'a', 0345}, |
233 | {'A', 'A', '\305'}, {'a', 'a', '\345'}, | 233 | {'A', 'A', 0305}, {'a', 'a', 0345}, |
234 | {'A', 'E', '\306'}, {'a', 'e', '\346'}, | 234 | {'A', 'E', 0306}, {'a', 'e', 0346}, |
235 | {',', 'C', '\307'}, {',', 'c', '\347'}, | 235 | {',', 'C', 0307}, {',', 'c', 0347}, |
236 | {'`', 'E', '\310'}, {'`', 'e', '\350'}, | 236 | {'`', 'E', 0310}, {'`', 'e', 0350}, |
237 | {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, | 237 | {'\'', 'E', 0311}, {'\'', 'e', 0351}, |
238 | {'^', 'E', '\312'}, {'^', 'e', '\352'}, | 238 | {'^', 'E', 0312}, {'^', 'e', 0352}, |
239 | {'"', 'E', '\313'}, {'"', 'e', '\353'}, | 239 | {'"', 'E', 0313}, {'"', 'e', 0353}, |
240 | {'`', 'I', '\314'}, {'`', 'i', '\354'}, | 240 | {'`', 'I', 0314}, {'`', 'i', 0354}, |
241 | {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, | 241 | {'\'', 'I', 0315}, {'\'', 'i', 0355}, |
242 | {'^', 'I', '\316'}, {'^', 'i', '\356'}, | 242 | {'^', 'I', 0316}, {'^', 'i', 0356}, |
243 | {'"', 'I', '\317'}, {'"', 'i', '\357'}, | 243 | {'"', 'I', 0317}, {'"', 'i', 0357}, |
244 | {'-', 'D', '\320'}, {'-', 'd', '\360'}, | 244 | {'-', 'D', 0320}, {'-', 'd', 0360}, |
245 | {'~', 'N', '\321'}, {'~', 'n', '\361'}, | 245 | {'~', 'N', 0321}, {'~', 'n', 0361}, |
246 | {'`', 'O', '\322'}, {'`', 'o', '\362'}, | 246 | {'`', 'O', 0322}, {'`', 'o', 0362}, |
247 | {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, | 247 | {'\'', 'O', 0323}, {'\'', 'o', 0363}, |
248 | {'^', 'O', '\324'}, {'^', 'o', '\364'}, | 248 | {'^', 'O', 0324}, {'^', 'o', 0364}, |
249 | {'~', 'O', '\325'}, {'~', 'o', '\365'}, | 249 | {'~', 'O', 0325}, {'~', 'o', 0365}, |
250 | {'"', 'O', '\326'}, {'"', 'o', '\366'}, | 250 | {'"', 'O', 0326}, {'"', 'o', 0366}, |
251 | {'/', 'O', '\330'}, {'/', 'o', '\370'}, | 251 | {'/', 'O', 0330}, {'/', 'o', 0370}, |
252 | {'`', 'U', '\331'}, {'`', 'u', '\371'}, | 252 | {'`', 'U', 0331}, {'`', 'u', 0371}, |
253 | {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, | 253 | {'\'', 'U', 0332}, {'\'', 'u', 0372}, |
254 | {'^', 'U', '\333'}, {'^', 'u', '\373'}, | 254 | {'^', 'U', 0333}, {'^', 'u', 0373}, |
255 | {'"', 'U', '\334'}, {'"', 'u', '\374'}, | 255 | {'"', 'U', 0334}, {'"', 'u', 0374}, |
256 | {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, | 256 | {'\'', 'Y', 0335}, {'\'', 'y', 0375}, |
257 | {'T', 'H', '\336'}, {'t', 'h', '\376'}, | 257 | {'T', 'H', 0336}, {'t', 'h', 0376}, |
258 | {'s', 's', '\337'}, {'"', 'y', '\377'}, | 258 | {'s', 's', 0337}, {'"', 'y', 0377}, |
259 | {'s', 'z', '\337'}, {'i', 'j', '\377'}, | 259 | {'s', 'z', 0337}, {'i', 'j', 0377}, |
260 | }; | 260 | }; |
261 | 261 | ||
262 | unsigned int accent_table_size = 68; | 262 | unsigned int accent_table_size = 68; |
diff --git a/drivers/s390/char/defkeymap.c b/drivers/s390/char/defkeymap.c index 389346cda6c8..9692d6a205ef 100644 --- a/drivers/s390/char/defkeymap.c +++ b/drivers/s390/char/defkeymap.c | |||
@@ -151,8 +151,8 @@ char *func_table[MAX_NR_FUNC] = { | |||
151 | }; | 151 | }; |
152 | 152 | ||
153 | struct kbdiacruc accent_table[MAX_DIACR] = { | 153 | struct kbdiacruc accent_table[MAX_DIACR] = { |
154 | {'^', 'c', '\003'}, {'^', 'd', '\004'}, | 154 | {'^', 'c', 0003}, {'^', 'd', 0004}, |
155 | {'^', 'z', '\032'}, {'^', '\012', '\000'}, | 155 | {'^', 'z', 0032}, {'^', 0012', 0000}, |
156 | }; | 156 | }; |
157 | 157 | ||
158 | unsigned int accent_table_size = 4; | 158 | unsigned int accent_table_size = 4; |
diff --git a/kernel/exit.c b/kernel/exit.c index 506a957b665a..cd20bf07e9e3 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -214,20 +214,19 @@ struct pid *session_of_pgrp(struct pid *pgrp) | |||
214 | static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task) | 214 | static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task) |
215 | { | 215 | { |
216 | struct task_struct *p; | 216 | struct task_struct *p; |
217 | int ret = 1; | ||
218 | 217 | ||
219 | do_each_pid_task(pgrp, PIDTYPE_PGID, p) { | 218 | do_each_pid_task(pgrp, PIDTYPE_PGID, p) { |
220 | if (p == ignored_task | 219 | if ((p == ignored_task) || |
221 | || p->exit_state | 220 | (p->exit_state && thread_group_empty(p)) || |
222 | || is_global_init(p->real_parent)) | 221 | is_global_init(p->real_parent)) |
223 | continue; | 222 | continue; |
223 | |||
224 | if (task_pgrp(p->real_parent) != pgrp && | 224 | if (task_pgrp(p->real_parent) != pgrp && |
225 | task_session(p->real_parent) == task_session(p)) { | 225 | task_session(p->real_parent) == task_session(p)) |
226 | ret = 0; | 226 | return 0; |
227 | break; | ||
228 | } | ||
229 | } while_each_pid_task(pgrp, PIDTYPE_PGID, p); | 227 | } while_each_pid_task(pgrp, PIDTYPE_PGID, p); |
230 | return ret; /* (sighing) "Often!" */ | 228 | |
229 | return 1; | ||
231 | } | 230 | } |
232 | 231 | ||
233 | int is_current_pgrp_orphaned(void) | 232 | int is_current_pgrp_orphaned(void) |
@@ -255,6 +254,37 @@ static int has_stopped_jobs(struct pid *pgrp) | |||
255 | return retval; | 254 | return retval; |
256 | } | 255 | } |
257 | 256 | ||
257 | /* | ||
258 | * Check to see if any process groups have become orphaned as | ||
259 | * a result of our exiting, and if they have any stopped jobs, | ||
260 | * send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2) | ||
261 | */ | ||
262 | static void | ||
263 | kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent) | ||
264 | { | ||
265 | struct pid *pgrp = task_pgrp(tsk); | ||
266 | struct task_struct *ignored_task = tsk; | ||
267 | |||
268 | if (!parent) | ||
269 | /* exit: our father is in a different pgrp than | ||
270 | * we are and we were the only connection outside. | ||
271 | */ | ||
272 | parent = tsk->real_parent; | ||
273 | else | ||
274 | /* reparent: our child is in a different pgrp than | ||
275 | * we are, and it was the only connection outside. | ||
276 | */ | ||
277 | ignored_task = NULL; | ||
278 | |||
279 | if (task_pgrp(parent) != pgrp && | ||
280 | task_session(parent) == task_session(tsk) && | ||
281 | will_become_orphaned_pgrp(pgrp, ignored_task) && | ||
282 | has_stopped_jobs(pgrp)) { | ||
283 | __kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp); | ||
284 | __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp); | ||
285 | } | ||
286 | } | ||
287 | |||
258 | /** | 288 | /** |
259 | * reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd | 289 | * reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd |
260 | * | 290 | * |
@@ -635,22 +665,7 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced) | |||
635 | p->exit_signal != -1 && thread_group_empty(p)) | 665 | p->exit_signal != -1 && thread_group_empty(p)) |
636 | do_notify_parent(p, p->exit_signal); | 666 | do_notify_parent(p, p->exit_signal); |
637 | 667 | ||
638 | /* | 668 | kill_orphaned_pgrp(p, father); |
639 | * process group orphan check | ||
640 | * Case ii: Our child is in a different pgrp | ||
641 | * than we are, and it was the only connection | ||
642 | * outside, so the child pgrp is now orphaned. | ||
643 | */ | ||
644 | if ((task_pgrp(p) != task_pgrp(father)) && | ||
645 | (task_session(p) == task_session(father))) { | ||
646 | struct pid *pgrp = task_pgrp(p); | ||
647 | |||
648 | if (will_become_orphaned_pgrp(pgrp, NULL) && | ||
649 | has_stopped_jobs(pgrp)) { | ||
650 | __kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp); | ||
651 | __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp); | ||
652 | } | ||
653 | } | ||
654 | } | 669 | } |
655 | 670 | ||
656 | /* | 671 | /* |
@@ -735,11 +750,9 @@ static void forget_original_parent(struct task_struct *father) | |||
735 | * Send signals to all our closest relatives so that they know | 750 | * Send signals to all our closest relatives so that they know |
736 | * to properly mourn us.. | 751 | * to properly mourn us.. |
737 | */ | 752 | */ |
738 | static void exit_notify(struct task_struct *tsk) | 753 | static void exit_notify(struct task_struct *tsk, int group_dead) |
739 | { | 754 | { |
740 | int state; | 755 | int state; |
741 | struct task_struct *t; | ||
742 | struct pid *pgrp; | ||
743 | 756 | ||
744 | /* | 757 | /* |
745 | * This does two things: | 758 | * This does two things: |
@@ -753,25 +766,8 @@ static void exit_notify(struct task_struct *tsk) | |||
753 | exit_task_namespaces(tsk); | 766 | exit_task_namespaces(tsk); |
754 | 767 | ||
755 | write_lock_irq(&tasklist_lock); | 768 | write_lock_irq(&tasklist_lock); |
756 | /* | 769 | if (group_dead) |
757 | * Check to see if any process groups have become orphaned | 770 | kill_orphaned_pgrp(tsk->group_leader, NULL); |
758 | * as a result of our exiting, and if they have any stopped | ||
759 | * jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2) | ||
760 | * | ||
761 | * Case i: Our father is in a different pgrp than we are | ||
762 | * and we were the only connection outside, so our pgrp | ||
763 | * is about to become orphaned. | ||
764 | */ | ||
765 | t = tsk->real_parent; | ||
766 | |||
767 | pgrp = task_pgrp(tsk); | ||
768 | if ((task_pgrp(t) != pgrp) && | ||
769 | (task_session(t) == task_session(tsk)) && | ||
770 | will_become_orphaned_pgrp(pgrp, tsk) && | ||
771 | has_stopped_jobs(pgrp)) { | ||
772 | __kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp); | ||
773 | __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp); | ||
774 | } | ||
775 | 771 | ||
776 | /* Let father know we died | 772 | /* Let father know we died |
777 | * | 773 | * |
@@ -788,8 +784,8 @@ static void exit_notify(struct task_struct *tsk) | |||
788 | * the same after a fork. | 784 | * the same after a fork. |
789 | */ | 785 | */ |
790 | if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 && | 786 | if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 && |
791 | ( tsk->parent_exec_id != t->self_exec_id || | 787 | (tsk->parent_exec_id != tsk->real_parent->self_exec_id || |
792 | tsk->self_exec_id != tsk->parent_exec_id) | 788 | tsk->self_exec_id != tsk->parent_exec_id) |
793 | && !capable(CAP_KILL)) | 789 | && !capable(CAP_KILL)) |
794 | tsk->exit_signal = SIGCHLD; | 790 | tsk->exit_signal = SIGCHLD; |
795 | 791 | ||
@@ -986,7 +982,7 @@ NORET_TYPE void do_exit(long code) | |||
986 | module_put(tsk->binfmt->module); | 982 | module_put(tsk->binfmt->module); |
987 | 983 | ||
988 | proc_exit_connector(tsk); | 984 | proc_exit_connector(tsk); |
989 | exit_notify(tsk); | 985 | exit_notify(tsk, group_dead); |
990 | #ifdef CONFIG_NUMA | 986 | #ifdef CONFIG_NUMA |
991 | mpol_free(tsk->mempolicy); | 987 | mpol_free(tsk->mempolicy); |
992 | tsk->mempolicy = NULL; | 988 | tsk->mempolicy = NULL; |