Skip to content

Instantly share code, notes, and snippets.

@bryanwb
Created May 3, 2010
Embed
What would you like to do?
var sys = require('sys');
stdin = process.openStdin();
process.addListener('SIGINT', function(){
sys.puts('Received SIGINT');
});
var timeout = function(){
setTimeout(timeout, 50);
};
setTimeout(function(){
timeout();
}, 10);
/* while loop doesn't work because it blocks the whole node process
while (true){
;
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment