Implement serial blocking through select() instead of read().