]> 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)
commit048b56c59535f2d21b92443a69bc1ec973e1e964
tree9f815911a08f725c05c5f30c83e60d900fb1ba9a
parent32c694bb8653c537d4d26b1ab06ba82cd0292004
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