title: How to set interrupt with serial on linux?
body: <p>I want to set interrupt for serial port on linux,so I do it by signal.And the handler of signal hava worded,but I don't know how to get the number of character.Specifically I am not sure the third parameter in read() function when the handler is called by system.So,I need a solution that knows the amount of serial data.</p>
  
  <p>Thanks you all.</p>
  
  <p>PS：My English is not good,so the above may not be clearly expressed</p>
  
  <pre><code>void serialHandler(int sig)
  {
      read(fd,buffer,I don't know);
  }
  </code></pre>