Hacker News new | past | comments | ask | show | jobs | submit login

> in the part of the kernel that handled ttys

Yes, that's what I meant.

  OPOST    Enable implementation-defined output processing.
That gets set in a termios structure that gets passed to the kernel's terminal subsystem via ioctl.

https://github.com/torvalds/linux/blob/master/include/uapi/a...

https://github.com/torvalds/linux/blob/master/include/uapi/a...

https://github.com/torvalds/linux/blob/master/include/uapi/a...

https://github.com/torvalds/linux/blob/master/include/uapi/a...

> Linux only recently have moved this functionality out into the user-land layer.

That's certainly news to me. Numerous functions in this file allude to OPOST processing:

https://github.com/torvalds/linux/blob/master/drivers/tty/n_...

If it's not here, where did it move to?




Hmmm, I could swear I have read about moving line discipline out of the kernel in some LWN article but apparently no, it never happened (although it probably should've, there is no much reason to perform mapping of NL to CR-NL in the privilleged mode). Maybe I've confused it with what happened on the Windows side of things? They moved almost all of the console infrastructure out of the kernel recently and into the user space, and that definitely has happened.


I suspect Linux actually can't move it to user space. It would break binary compatibility with all user space code that sets OPOST via the ioctl. They can't hide it in a libc either.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: