title: Linux serial port reading - can I change size of input buffer?
body: <p>I am writing an application on Ubuntu Linux in C++ to read data from a serial port. It is working successfully by my code calling <code>select()</code> and then <code>ioctl(fd,FIONREAD,&amp;bytes_avail)</code> to find out how many bytes are available before finally obtaining the data using <code>read()</code>. </p>
  
  <p>My question is this: Every time <code>select</code> returns with data, the number of bytes available is reported as 8. I am guessing that this is a buffer size set somewhere and that select returns notification to the user when this buffer is full.</p>
  
  <p>I am new to Linux as a developer (but not new to C++) and I have tried to research (without success) if it is possible to change the size of this buffer, or indeed if my assumptions are even true. In my application timing is critical and I need to be alerted whenever there is a new byte on the read buffer. Is this possible, without delving into kernel code?</p>