# test.coffee
ps = require("prompt-sync")()
out = NaN
while isNaN out
out = parseInt ps("enter input")
When I run this using coffee test.coffee and instead of entering text try exiting with control+c, it does not exit but just goes to the next tick of the while loop. When I enter "1", it exits as expected.
There's also the same behavior in Javascript. Here is the same script compiled to JS:
// test.js
// Generated by CoffeeScript 2.0.3
(function() {
var out, ps;
ps = require("prompt-sync")();
out = 0/0;
while (isNaN(out)) {
out = parseInt(ps("enter input"));
}
}).call(this);
When running this with node test.js, the same behavior occurs.
Is this expected, or should we be manually handling control+c?
Sorry, I didnt read the readme ... the note on sigint is there. I wonder if sigint should default to true, I don't see the benefit in having false be the default, and it made me have to kill -9 the process.
I have the following simple coffeescript file:
When I run this using
coffee test.coffee
and instead of entering text try exiting with control+c, it does not exit but just goes to the next tick of thewhile
loop. When I enter "1", it exits as expected.There's also the same behavior in Javascript. Here is the same script compiled to JS:
When running this with
node test.js
, the same behavior occurs.Is this expected, or should we be manually handling control+c?