It is common knowledge that on Linux to send EOF to a console program you press CTRLD while on Windows you press CTRLZ.
However I suspect that this is not actually a feature of the OS, but rather of the terminal or shell or ... maybe something else (like gnu readline).
So what (sub)system/program translates these keys into EOF?