3 ms·
This isn't really about alternatives. Bike shedding could be about exit-vs-quit or similar. Ctrl-d exists a layer above though. In a typical terminal / readline
by viraptor 8y ago
This isn't really about alternatives. Bike shedding could be about exit-vs-quit or similar. Ctrl-d exists a layer above though. In a typical terminal / readline, your process will get an EOF / HUP signal which is treated like a clean-exit in most interactive cases and config-reload in many servers.
Just like ctrl-c generates INT and ctrl-z generates STP. This is worth learning.
- colanderman 8y agoDon't forget Ctrl-\. For when you feel like Ctrl-C is too nice. (It sends SIGQUIT.)
- majewsky 8y ago> Just like ctrl-c generates INT and ctrl-z generates STP. It's very different. Ctrl-D does not generate signals. When written into the tty master, it forces the kernel to answer any pending read() syscalls on the tty slave, even if it means returning 0 bytes. Programs then apply the convention of treating a read() that returns 0 bytes as meaning EOF (because that's how it works with all other file types that are not tty slaves).