unsigned int normal_poll (struct tty_struct * tty, struct file * file, poll_table * wait);
Called when the line discipline is asked to poll for data or for special events. This code is not serialized with respect to other events save open/close.
This code must be sure never to sleep through a hangup. Called without the kernel lock held - fine
if someone changes the VMIN or discipline settings for the terminal while another process is in poll the poll does not recompute the new limits. Possibly set_termios should issue a read wakeup to fix this bug.