5 ms·
Thanks, it makes sense now. So with every `read' to the tty it starts a new edit buffer, I pressume?
by int0x80 9y ago
Thanks, it makes sense now. So with every `read' to the tty it starts a new edit buffer, I pressume?
- Tyr42 9y agoNo I don't think it's the "Read" call, but rather your program doesn't see any input in stdin until an enter is pressed. (In cooked mode).
- int0x80 9y agoI think I didn't explain myself. What you say is true, but even if your program doesn't see any input, you can (the kernel n_tty line discipline) edit the input (delete it). So if I do print() read() print() read() the reads will only be able to edit what has been input since that particular syscall.