{"id":4,"date":"2007-08-17T02:17:32","date_gmt":"2007-08-16T20:23:57","guid":{"rendered":""},"modified":"2017-03-07T09:43:28","modified_gmt":"2017-03-07T16:43:28","slug":"pining_for_c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/lavajoe\/2007\/08\/17\/pining_for_c\/","title":{"rendered":"Pining for ^C"},"content":{"rendered":"<p>For those of us with a long Unix\/Linux history, one of the most cherished, useful, and powerful key combinations is Ctrl-C.  Doesn&#8217;t it just give you a satisfying feeling to kill that process that is running amok, spitting loads of misguided output to your xterm?  Feels good, doesn&#8217;t it?  Sometimes holding the control key and hitting &#8220;C&#8221; is preceded by an utterance of &#8220;Crap!&#8221; or some other expression of high emotion, and when that prompt comes back, as if saying, &#8220;You rang?&#8221;, I know I am totally in control, &#8220;C&#8221; that is.<\/p>\n<p>OK, this article is not all about sending SIGINTs&#8230;  That would be pretty boring.  It&#8217;s about something I miss terribly: actually seeing ^C just before the process is killed.  There&#8217;s something beautiful and <i>informative<\/i> about the letter C preceded by our beloved caret.  You might say, &#8220;Why?  Don&#8217;t you realize you hit Ctrl-C?  Why do you care to <i>see<\/i> it?&#8221;  I&#8217;ll tell you&#8230;<\/p>\n<p>One example is when I try running something several times, interrupting it some of those times, and I forget whether the process naturally (or unnaturally) just quit or if I did hit Ctrl-C (it&#8217;s such a reflex that it&#8217;s often pretty subconscious).  In Linux, I often find myself looking for an extra blank line (which is the only feeble trace of the Ctrl-C), but that&#8217;s just not a very positive indication!  I don&#8217;t know about you, but I want to know for sure.  Some programs tell you in no uncertain terms when you interrupt them (like Python scripts, portage, etc.), but then there are some that silently &#8220;go away&#8221; with no sign that anything happened (e.g. genkernel).  Not only that, but why <i>not<\/i> echo the Ctrl-C?  Guess what?  Other variants of Unix have done it for years (e.g. FreeBSD).  Why did Linux choose to forgo the ^C?  I don&#8217;t know, and Googling &#8482; for it tells me little if not nothing.<\/p>\n<p>What I <i>do<\/i> know is that I am on a quest to get back ^C, ^Z, etc.  After chasing a red herring or two, I think I&#8217;m on it.  I am recompiling my Linux kernel right now, and after a one-line change to &#8220;drivers\/char\/n_tty.c&#8221;, I have high hopes that I will have ^C back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those of us with a long Unix\/Linux history, one of the most cherished, useful, and powerful key combinations is Ctrl-C. Doesn&#8217;t it just give you a satisfying feeling to kill that process that is running amok, spitting loads of misguided output to your xterm? Feels good, doesn&#8217;t it? Sometimes holding the control key and &hellip; <a href=\"https:\/\/blogs.gentoo.org\/lavajoe\/2007\/08\/17\/pining_for_c\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Pining for ^C<\/span><\/a><\/p>\n","protected":false},"author":64,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/posts\/4"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/posts\/4\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/lavajoe\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}