Skip to content

Commit

Permalink
Merge pull request #971 from WMeldon/sigint-trapping
Browse files Browse the repository at this point in the history
Make sure the build traps `SIGINT` and `SIGTERM` for cleanup.
  • Loading branch information
stefanpenner committed Jun 10, 2014
2 parents 4c2511c + 3f78f8c commit c454ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/models/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = Task.extend({

process.addListener('exit', this.onExit.bind(this));

if (signalsTrapped) {
if (!signalsTrapped) {
process.on('SIGINT', this.onSIGINT.bind(this));
process.on('SIGTERM', this.onSIGTERM.bind(this));
signalsTrapped = true;
Expand Down

0 comments on commit c454ba1

Please sign in to comment.