How Terminals Work

(how-terminals-work.vercel.app)

45 points | by gnodar 2 days ago ago

6 comments

  • JdeBP 8 minutes ago ago
  • Cr8 17 hours ago ago

    nitpick - EOF is not a signal, it just flushes the current line content without needing a newline in cooked mode and doing this on an empty line results in a 0 byte read(), which most apps interpret as EOF

    and the terminal emulator is not itself sending the signals, its always just sending raw characters to the pty device - it is the kernel's pty layer sending a signal if the right flags are on and doing line buffering, local echo, etc. and signals go to the foreground process group (which is set by the shell making a tcsetpgrp syscall)

  • 17 hours ago ago
    [deleted]
  • neeewbee a day ago ago

    Thanks for this great work, very helpful. Today I learned!

  • mcc1ane 18 hours ago ago
  • g-b-r a day ago ago

    Wow, this seems so good !!!