]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Signal foreground group processes in hangup
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 6 Mar 2013 12:20:56 +0000 (07:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 21:02:32 +0000 (14:02 -0700)
commit3eaadbb636658bb042c8b53f4ed77c5c8526203b
tree9f815911a08f725c05c5f30c83e60d900fb1ba9a
parentad6f3f9ef48e7c9d8c29c19cad4e3a253cf0670b
tty: Signal foreground group processes in hangup

When the session leader is exiting, signal the foreground group
processes as part of the hangup sequence, instead of after the
hangup is complete. This prepares for hanging up the
line discipline _after_ signalling processes which
may be blocking on ldisc i/o.

Parameterize __tty_hangup() to distinguish between when the
session leader is exiting and all other hangups; signal the
foreground group after signalling the session leader and its
process group, which preserves the original signal order.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c