patch-2.1.93 linux/drivers/char/pty.c

Next file: linux/drivers/char/rocket.c
Previous file: linux/drivers/char/pc_keyb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.92/linux/drivers/char/pty.c linux/drivers/char/pty.c
@@ -7,6 +7,9 @@
  *    -- C. Scott Ananian <cananian@alumni.princeton.edu>, 14-Jan-1998
  */
 
+#include <linux/config.h>
+#include <linux/module.h>	/* For EXPORT_SYMBOL */
+
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
@@ -22,6 +25,9 @@
 #include <asm/system.h>
 #include <asm/bitops.h>
 
+#define BUILDING_PTY_C 1
+#include <linux/devpts_fs.h>
+
 struct pty_struct {
 	int	magic;
 	struct wait_queue * open_wait;
@@ -66,6 +72,7 @@
 	if (tty->driver.subtype == PTY_TYPE_MASTER) {
 		tty_hangup(tty->link);
 		set_bit(TTY_OTHER_CLOSED, &tty->flags);
+		devpts_pty_kill(MINOR(tty->device) - tty->driver.minor_start);
 	}
 }
 
@@ -363,6 +370,5 @@
 		panic("Couldn't register compat pty driver");
 	if (tty_register_driver(&old_pty_slave_driver))
 		panic("Couldn't register compat pty slave driver");
-	
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov