Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2010
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);
}, 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