Having more than one process read from a serial device (/dev/ttyXX) makes it so that both processes can\'t get all of the data -- the data will be split between them in some
Add an inotify watch on the slave pty and poll on that. You can get an inotify event on open. You can then poll on the inotify file descriptor and the master pty file descriptor. You can get an inotify event for open (IN_OPEN). This will unblock the poll when the slave side is opened.