fd = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
...
s_rc = select(fd + 1, &rset, NULL, NULL, &tv);
The first argument should be 1, not fd + 1
fd = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
...
s_rc = select(fd + 1, &rset, NULL, NULL, &tv);
The first argument should be 1, not fd + 1