EOT (End of Transmission) is ASCII code point 4 (0x04), Unicode U+0004. It is a C0 control character that told a teleprinter the sending station had finished its entire transmission — distinct from ETX (0x03), which only closed a single text block within a session. In IBM BSC, EOT released the line after the final ACK was received, returning both stations to idle and freeing the half-duplex link for a new conversation. Ctrl+D emits 0x04, and Unix shells repurposed it as the end-of-input signal — typing it on an empty line tells the terminal driver to return zero bytes from read(), which most programs interpret as EOF and exit gracefully. That shell behavior is why Ctrl+D logs you out of SSH sessions and closes interactive interpreters like Python and irb. UTF-8 encodes it as the single byte 0x04; Unicode classifies it as Cc (Control) with the alias END OF TRANSMISSION.
char eot = 0x04; // ASCII EOTif (read(0, &eot, 1) == 0) {} // EOF on stdin (Ctrl+D in a TTY)int done = (eot == 0x04); // Treat as stream termination
EOT (ASCII 4) signals the end of a transmission — 'I'm done sending.' In Unix terminals, Ctrl+D sends EOT to indicate end-of-input, which is why pressing it on an empty line closes your shell or terminates a program reading from stdin.
Ctrl+D sends EOT (ASCII 4). When your shell reads from stdin and gets EOT on an empty line, it interprets it as end-of-file and exits gracefully. It's not killing the process — it's politely saying 'no more input is coming.'
Ctrl+C (ETX) sends SIGINT to forcefully interrupt a process. Ctrl+D (EOT) signals end-of-file so the program finishes naturally. Think of Ctrl+C as slamming the door, and Ctrl+D as calmly saying 'goodbye.'
Not directly in modern protocols, but the concept is similar. TCP has FIN, HTTP/2 has END_STREAM, and SSH channels have EOF messages. EOT's role in serial communication — 'my transmission is complete' — inspired these graceful shutdown signals.