canonical mode #1

Open
opened 2026-05-08 21:09:02 +00:00 by jaynuine · 1 comment
Owner

we are to assert whether the associated tty is running in canonical mode, as this will determine the behaviour of read applied to the standard input

in canonical mode, read should yield whole lines at once, and will hang until it is able to supply all n requested bytes ; in such a mode, interrupts take the form of signals, and the read call may be interrupted by a signal handler

in non canonical mode,
by default, min = 1 and time = 0

we are to assert whether the associated tty is running in canonical mode, as this will determine the behaviour of `read` applied to the standard input in canonical mode, read should yield whole lines at once, and will hang until it is able to supply all n requested bytes ; in such a mode, interrupts take the form of signals, and the read call may be interrupted by a signal handler in non canonical mode, by default, min = 1 and time = 0
jaynuine added this to the todo project 2026-05-08 21:09:02 +00:00
Author
Owner

if isatty, we should get our input from readline to enable history and signal handling
otherwise, we are sourcing a file into the env, and we should rely on gnl

if isatty, we should get our input from readline to enable history and signal handling otherwise, we are sourcing a file into the env, and we should rely on gnl
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaynuine/minishell#1
No description provided.