patch-2.1.91 linux/drivers/char/tty_io.c

Next file: linux/drivers/misc/parport_pc.c
Previous file: linux/drivers/char/stallion.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.90/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -66,6 +66,7 @@
 #include <linux/interrupt.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
+#include <linux/file.h>
 #include <linux/console.h>
 #include <linux/timer.h>
 #include <linux/ctype.h>
@@ -1734,8 +1735,8 @@
 		    ((session > 0) && (p->session == session)))
 			send_sig(SIGKILL, p, 1);
 		else if (p->files) {
-			for (i=0; i < NR_OPEN; i++) {
-				filp = p->files->fd[i];
+			for (i=0; i < p->files->max_fds; i++) {
+				filp = fcheck_task(p, i);
 				if (filp && (filp->f_op == &tty_fops) &&
 				    (filp->private_data == tty)) {
 					send_sig(SIGKILL, p, 1);

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