Adding first part of infrastructure for tty device handling