To make it easier though I can point you in direction of Alan Cox commits around 2010-2013 and his work on TTY subsystem in particular.