Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175364
b: refs/heads/master
c: 5ec93d1
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent a7514e1 commit 3e142e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 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: 38c70b27f9502c31c1d0c29676275f7362cdb0d9
refs/heads/master: 5ec93d1154fd1e269162398f8e70efc7e004485d
5 changes: 3 additions & 2 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ void disassociate_ctty(int on_exit)
struct tty_struct *tty;
struct pid *tty_pgrp = NULL;

if (!current->signal->leader)
return;

tty = get_current_tty();
if (tty) {
Expand Down Expand Up @@ -772,8 +774,7 @@ void no_tty(void)
{
struct task_struct *tsk = current;
lock_kernel();
if (tsk->signal->leader)
disassociate_ctty(0);
disassociate_ctty(0);
unlock_kernel();
proc_clear_tty(tsk);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ NORET_TYPE void do_exit(long code)
exit_thread();
cgroup_exit(tsk, 1);

if (group_dead && tsk->signal->leader)
if (group_dead)
disassociate_ctty(1);

module_put(task_thread_info(tsk)->exec_domain->module);
Expand Down

0 comments on commit 3e142e5

Please sign in to comment.