Hi Greg,

Thanks for the answer. I don't understand why I should use 1 instead of
fs + 1. The documentation says

"nfds This argument should be set to the highest-numbered file descriptor
in any of the three sets, plus 1. "

In the portserial.c nfds was set to fd + 1

Daniel Pereira de Carvalho


Em sex., 20 de nov. de 2020 às 14:04, Gregory Nutt <spudan...@gmail.com>
escreveu:

>
> >    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
>
>
>

Reply via email to