termios problem or feature?

Joel Sherrill joel.sherrill at OARcorp.com
Mon Aug 13 20:26:49 UTC 2001

> Mike Siers wrote:
> Hi,
> I am using the latest RTEMS snapshot with the i386/pc586 BSP.
> I have a simple program that is just opening up a serial port and
> writing out a string.  The application on the other end of the serial
> port will write out a block of information to the serial port when it
> receives this initial string.
> I have noticed that the read() function call will only return one
> character at a time even though I know the termios buffer has
> more information than that.
> Basically, the function fillBufferQueue() in libc/termios.c returns
> as soon as it has copied VMIN characters.  Should it instead
> copy all available characters that will fit into the given buffer?
> Is this a bug or is termios behaving correctly?

I think this is a feature. :)

You might be better served setting VTIM and having a higher VMIN.
See if this link explains your behavior:


> I have a simple patch to allow it return more than VMIN characters
> but I want to ensure this is the correct behavior.
> Thanks
> Mike Siers

Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list