Skip to content

Commit

Permalink
Merge pull request #90 from pandastrike/issue/88/sigint-handler
Browse files Browse the repository at this point in the history
Quit h9 on ctrl-c
  • Loading branch information
f1337 authored Sep 30, 2016
2 parents 6660a11 + b1a428d commit 228e3ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cli.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ program = require "commander"
require "./index"
{run} = require "panda-9000"

# exit on ctrl-c, related signals
# https://github.com/pandastrike/haiku9/issues/88
process.on 'SIGHUP', ()-> process.exit()
process.on 'SIGINT', ()-> process.exit()
process.on 'SIGQUIT', ()-> process.exit()
process.on 'SIGABRT', ()-> process.exit()
process.on 'SIGTERM', ()-> process.exit()


call ->

{version} = JSON.parse yield read join __dirname, "..", "package.json"
Expand Down

0 comments on commit 228e3ff

Please sign in to comment.