diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 913b50258f90..b5f57d0b30ee 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -730,6 +730,25 @@ void tty_vhangup(struct tty_struct *tty) | |||
730 | EXPORT_SYMBOL(tty_vhangup); | 730 | EXPORT_SYMBOL(tty_vhangup); |
731 | 731 | ||
732 | /** | 732 | /** |
733 | * tty_vhangup_self - process vhangup for own ctty | ||
734 | * | ||
735 | * Perform a vhangup on the current controlling tty | ||
736 | */ | ||
737 | |||
738 | void tty_vhangup_self(void) | ||
739 | { | ||
740 | struct tty_struct *tty; | ||
741 | |||
742 | mutex_lock(&tty_mutex); | ||
743 | tty = get_current_tty(); | ||
744 | if (tty) { | ||
745 | tty_vhangup(tty); | ||
746 | tty_kref_put(tty); | ||
747 | } | ||
748 | mutex_unlock(&tty_mutex); | ||
749 | } | ||
750 | |||
751 | /** | ||
733 | * tty_hung_up_p - was tty hung up | 752 | * tty_hung_up_p - was tty hung up |
734 | * @filp: file pointer of tty | 753 | * @filp: file pointer of tty |
735 | * | 754 | * |