Notice: We have migrated to GitLab launching 2024-05-01 see here:

#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 12/03/06 at 13:31:13.

Download all attachments as: .zip

Change History (4)

comment:1 Changed on 05/05/03 at 11:38:19 by thomas.doerfler

Status: assignedwaiting

comment:2 Changed on 05/26/03 at 14:57:45 by Joel Sherrill

Status: waitingclosed

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

Changed on 12/03/06 at 13:31:13 by thomas.doerfler

Attachment: termios_canon.diff added


comment:3 Changed on 10/10/17 at 06:35:44 by Sebastian Huber

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