tag:blogger.com,1999:blog-7094652.post8069742894679200534..comments2024-03-13T10:20:27.668+00:00Comments on Neil Mitchell's Blog (Haskell etc): Handling Control-C in HaskellNeil Mitchellhttp://www.blogger.com/profile/13084722756124486154noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7094652.post-40671188934306455872021-11-11T14:58:32.732+00:002021-11-11T14:58:32.732+00:00Great readding your blogGreat readding your blogAshlee Dyerhttps://www.ashleedyer.com/noreply@blogger.comtag:blogger.com,1999:blog-7094652.post-51778117365638387212015-05-22T04:58:51.376+01:002015-05-22T04:58:51.376+01:00I'd like to comment on some of the nuances her...I'd like to comment on some of the nuances here. This is somewhat beside the point given your focus on how to deal with signals once they reach your Haskell program, but I think it's still relevant.<br /><br />Firstly, Ctrl-c and SIGINT are very different. Unix shells are very good at translating the former into the latter, but on Windows we are not so fortunate.<br /><br />I find this article to be a good intro, good history lesson, as well as providing context for reasoning about the subtleties: <br />http://www.linusakesson.net/programming/tty/<br /><br />In particular, one of the implications from that article is that Windows doesn't have a reliable way to deliver (unix) signals from the terminal/console, because (unix) job control is not baked in at a low enough level.<br /><br />Cygwin adds a layer that gets between all cygwin-built programs and windows that adds unix style job control, but it only works for things that are built and linked properly.<br /><br />Programs built with MinGW, for example, won't strictly follow the signal semantics like cygwin programs will. Typical windows programs are similar in this regard.dagitjhttps://www.blogger.com/profile/10574172070227922360noreply@blogger.com