summaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-10-10 20:28:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 21:30:49 -0700
commit2812d9e9fd94c54b0482215f579e6aa04452a322 (patch)
tree04be4bb895b4bbde79538de1e61550fcae6d9dbe /include/linux/tty.h
parent71a5cd8a4a2602a6e9010b557a23af0a54df87b6 (diff)
downloadop-kernel-dev-2812d9e9fd94c54b0482215f579e6aa04452a322.zip
op-kernel-dev-2812d9e9fd94c54b0482215f579e6aa04452a322.tar.gz
tty: Combine SIGTTOU/SIGTTIN handling
The job_control() check in n_tty_read() has nearly identical purpose and results as tty_check_change(). Both functions' purpose is to determine if the current task's pgrp is the foreground pgrp for the tty, and if not, to signal the current pgrp. Introduce __tty_check_change() which takes the signal to send and performs the shared operations for job control() and tty_check_change(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index c2889f4..533d7f6 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -423,6 +423,7 @@ extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
const char *routine);
extern const char *tty_name(const struct tty_struct *tty);
extern void tty_wait_until_sent(struct tty_struct *tty, long timeout);
+extern int __tty_check_change(struct tty_struct *tty, int sig);
extern int tty_check_change(struct tty_struct *tty);
extern void __stop_tty(struct tty_struct *tty);
extern void stop_tty(struct tty_struct *tty);
OpenPOWER on IntegriCloud