Interfacing with pseudo terminal devices