News for hackers. Stuff that matters.
Re:Heroku Fucking Console by Karunamon on Friday March 01, 2013 @02:21PM (#5306350)
Wouldn't this mean that the application has some concept of state, then? Following output, running a search, etc?

If your state is just sitting in the file, interpret the signal as exit.

Re:Heroku Fucking Console by jlgreco on Friday March 01, 2013 @04:18PM (#5306996)
It is possible, though arguably it wouldn't necessarily be the best user experience. At least I know I have the habit of smacking ctrl-c several times in a row when something isn't responding as rapidly as I like. Things like ctrl-c probably should not be stateful if one of the potential things it can do is close your program.

As another example, perhaps it would be nice if ctrl-w deleted one word backwards if you were currently editing text in your webbrowser, but close your current tab/window otherwise. If the state is always what the user expects when they press ctrl-w it would work fine, but in reality you would have lots of people accidentally closing tabs.

Re:Heroku Fucking Console by nailer on Sunday March 03, 2013 @01:10PM (#5314585)
SIGINT in less wouldn't lose work though. It's safe and would be consistent with other apps and other uses of SIGINT inside less.
Re:Heroku Fucking Console by tjoff on Friday March 01, 2013 @04:14PM (#5306986)
So if the search finished just before issue ctrl+c you will close the application instead. Be vary of inconsistencies, even if they are just perceived inconsistencies.
Re:Heroku Fucking Console by raylu on Friday March 01, 2013 @04:08PM (#5306960)
It would be pretty annoying if I ran a search or a follow (shift+F), thought it was taking too long, and hit Ctrl+C right after it finished.

Ctrl+C doesn't mean "end this program." If you want that, consider Ctrl+\.

Re:Heroku Fucking Console by nitrogen on Friday March 01, 2013 @04:55PM (#5307183)
Even Ctrl+\ (SIGQUIT) doesn't always "end this program." Java uses it to print a stack trace to the console.
Re:Heroku Fucking Console by LeonidasXIV on Friday March 01, 2013 @08:42PM (#5308079)
Most Java programs I have to deal with print stack traces to the console even without prompting because somebody thought that the `ex.printStackTrace();` IDE autofix is definitely more than enough to handle an exception.