quitting in the terminal

wizard zines
@b0rk TIL about the C→3→SIGINT mapping!

@dngrs @b0rk A tiny technical caveat: control-C sends a byte with value 0x03 on purpose; this is designed into ASCII; the control key maps A through Z to control codes 1 through 26 in alphabetical order; yes, this is why control-[ is another way to type the ESC key.

But the "character code 0x03 means send SIGINT" rule is adjustable (with the `stty` command) and SIGINT itself is usually *not* signal number 3 (there's no official rule for which signals have which numbers, but SIGINT is almost always number 2).

@zwol @dngrs @b0rk I'd like to link this [1] here since it does a great job of explaining the relation between keys and codes, for whomever is curious about this. (It also claims that Ctrl+C has no relation to ETX which would explain why SIGINT isn't signal number 3)

[1] http://www.catb.org/~esr/faqs/things-every-hacker-once-knew/#_ascii

Things Every Hacker Once Knew

@dandels @dngrs @b0rk ugh, please don't ever link people to references written by Eric Raymond. They are consistently only about 2/3 accurate, plus 1/3 *egregiously wrong*, with the wrong bits tangled up with the accurate bits so thoroughly that it's hopeless to try to sort them out
@zwol Hm, alright, I'll keep this in mind. Alas, finding quality sources is hard.