Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 97 23:09:26 +0000
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: select() on a serial device--ignoring OS buffered chars?
Message-ID:  <"45f6-970114221805-5E50*/G=Andrew/S=Gordon/O=NET-TEL Computer Systems Ltd/PRMD=NET-TEL/ADMD=Gold 400/C=GB/"@MHS>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
>         scount = select(1, &read_fds, NULL, NULL, &tv);
                         This looks like the problem to me.

The select() manpage is a little confusing - that first parameter is the
number of bits in the mask that get inspected, not the number of
active fds ('1' bits).  See selscan() in /sys/kern/sys_generic.c

So unless your FD happens to be zero, this call isn't going to do
anything useful.

Want to link to this message? Use this URL: <"45f6-970114221805-5E50*/G=Andrew/S=Gordon/O=NET-TEL Computer Systems Ltd/PRMD=NET-TEL/ADMD=Gold 400/C=GB/">