pty: fix data loss when stopped (^S/^Q)