I will try pool() and see if the problem persists.

Thanks

Daniel Pereira de Carvalho


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

> Okay, I got that wrong.  I seldom used select(), it is just an
> additional layer on top of poll() which is much more efficient.
>
> On 11/20/2020 11:13 AM, Daniel Pereira Carvalho wrote:
> > 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