#399 closed defect (fixed)

termios reads too much data in canonical mode

Reported by: thomas.doerfler Owned by: Joel Sherrill
Priority: normal Milestone: 2
Component: unspecified Version: 4.6
Severity: major Keywords:
Cc: bugs@…, thomas.doerfler@… Blocked By:


In canonical mode, when input is present in the input buffer that contains an EOL character and some following characters, a read call read data behind the EOL character, although it should stop reading with the EOL character.



  1. set up termios to work in canonical mode, with a certain EOL character defined.
  2. receive data on the serial line, with data following the first EOL character
  3. After some time, perform a read with a big read buffer

RESULT: The read buffer will contain data after the first EOL, which is wrong.

Attachments (1)

termios_canon.diff (683 bytes) - added by thomas.doerfler on Dec 3, 2006 at 1:31:13 PM.

Download all attachments as: .zip

Change History (4)

comment:1 Changed on May 5, 2003 at 11:38:19 AM by thomas.doerfler

Status: assignedwaiting

comment:2 Changed on May 26, 2003 at 2:57:45 PM by Joel Sherrill

Status: waitingclosed

State-Changed-From-To: feedback->closed
State-Changed-Why: Patch applied to both 4.6 and trunk.

Changed on Dec 3, 2006 at 1:31:13 PM by thomas.doerfler

Attachment: termios_canon.diff added


comment:3 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

Component: miscunspecified
Note: See TracTickets for help on using tickets.