[Haskell-cafe] gracefully invoking `less` using System.Process (and ignoring ctrl-c)

Brandon Allbery allbery.b at gmail.com
Fri Dec 12 17:33:10 UTC 2014


On Fri, Dec 12, 2014 at 12:19 PM, Guillaume Hoffmann <guillaumh at gmail.com>
wrote:
>
> The problem is that pressing CTRL-C in `less` now kills everything
> (darcs+less).
> Is there a way to fix this?
>

On Unix you'd just arrange for your job to ignore sigINT itself, overriding
the withSignalHandled setting. The various online documentation systems are
all on Linux and don't document win32-specific modules as a result, but it
looks like you might be able to use

    withCtrlCHandler id realActionGoesHere

on Windows. (Someone with Windows knowledge needs to verify that; it's
nested under another withCtrlCHandler in withSignalHandled, and I have no
clue how they would interact.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141212/ce05fd20/attachment.html>


More information about the Haskell-Cafe mailing list